Skip to main content

Posts

Showing posts from March, 2016

TFS 2015 Programmability–Breaking change in Update 1

A warning for everyone who has planned to upgrade to TFS 2015 Update 1(or later)… If you created server-side plugins for TFS and specifically are using the Microsoft.TeamFoundation.Framework.Server.ISubscriber interface, be aware that Update 1 includes a breaking change in that interface, meaning that all server-side plugins compiled against TFS 2015 will need to be modified in order to work with TFS 2015 Update 1 servers. The table below outlines the set of impacted classes and interfaces: Old Reference New Reference TeamFoundationRequestContext IVssRequestContext TeamFoundationServiceHost IVssServiceHost ITeamFoundationService IVssFrameworkService DeploymentServiceHost IVssDeploymentServiceHost More information here: https://blogs.msdn.microsoft.com/visualstudioalm/2015/10/13/breaking-change-in-tfs-2015-update-1-for-server-side-plugins/

TFS Build Error: Invalid expression term '.'

A colleague passed by my desk yesterday with the following question: We recently moved to Visual Studio 2015 and started to use some of the new C# language features in .NET 4.6, like for example Null Conditional operators . However after doing that our CI build started to fail on the Build server. What I’m doing wrong? Or are there some components missing on the build server? When I took a look at the failing build I saw the following error messages: Handlers\DocumentMestbankLoketHandler.cs (42, 0) Invalid expression term '.' Handlers\DocumentMestbankLoketHandler.cs (42, 0) Syntax error, ':' expected Handlers\DocumentMestbankLoketHandler.cs (42, 0) ; expected Handlers\DocumentMestbankLoketHandler.cs (42, 0) Invalid expression term ')' Handlers\DocumentMestbankLoketHandler.cs (42, 0) ; expected​ I started by checking the build server if .NET 4.6 and the Build tools for Visual Studio 2015 were installed. Both we

CQRS+Event Sourcing Blog series

As I’m working on a project where are using Event Sourcing, I try to read all material I can find about the topic. One great resource is the blog series by William Verdolini about CQRS + Event Sourcing. An overview of the content: Intro CQRS+ES Architecture Inversion of Control 3.1 Command Handling via DI 3.2 Service Locator 3.3 Typed Factory 4. Workers Validation Logic Set Validation Have I understood? Some concerns Event Store NEventStore Aggregate Snapshots Identity Mapping Legacy Migration Event Upconversion Async matters UI Notification with SignalR OWIN + SignalR + Castle.Windsor NEventStore PollingClient Don’t forget to have a look at the associated code as well: https://github.com/williamverdolini/CQRS-ES-Todos/

Generate your API documentation with DocFX

After using Sandcastle for years as my default code documentation tool, I’m happy that I can finally leave Sandcastle behind and switch to a better tool; DocFX . From the documentation DocFX is an API documentation generator for .NET, currently it supports C# and VB. It has the ability to generate API reference documentation from triple slash comments of your source code. What's more, it allows you to use markdown files to create additional topics like tutorials, how-tos, or even customize the generated reference documentation. DocFX builds a static HTML web site from your source code and markdown files, which can be easily hosted on any web servers, for example, github.io. DocFX also provides you the flexibility to customize the layout and style of your web site through templates. If you are interested in creating your own web site with your own styles, you can follow how to create custom template to create custom templates. DocFX also has the following cool feature

fsharpConf 2016–Videos

In case you missed it, March started great with a first edition of fsharpConf , a free virtual event featuring world-class F# experts across the globe. It showcases F# in action on a wide range of practical applications. Luckily all sessions are recorded and available on Channel 9. If you are an F# developer or are interested in becoming one, go check it out…

Team Foundation Server: How to migrate TFS Version Control project by project–Part 2

If you want to migrate a full TFS collection, support is built-in. But what if you want to migrate a specific project but want to keep the source code history? I blogged about a solution I used before by using Git as a way to move code between 2 TFS Version Control repositories. (Here is the link in case you cannot find it: http://bartwullems.blogspot.be/2015/05/team-foundation-server-how-to-migrate.html ). I used this approach multiple teams with great success. However some people who tried to do the same thing complained that the approach I described didn’t work when you have multiple branches. So time to solve this and add the misssing steps required to migratie multiple branches: Extract the old TFS project including all branches with the git-tfs tool : git-tfs clone --with-branches http://oldtfs:8080/tfs/DefaultCollection $/BranchingDemo/Main Open the .config file inside the .git folder and add a new remote:  [core] repositoryformatversion = 0

InfoQ–Why Agile Works mini book

A great read I can recommend for everyone interested in the Agile (r)evolution. It really focusses on the core concepts behind Agile and how to evolve from ‘doing Agile’ to ‘being Agile’.  From the website : Why do some companies excel with agile and others see virtually no improvement? The difference is culture and an understanding that agile is a framework for deep cultural change instead of a process or set of practices to increase efficiency. Processes and methods can become stale and rote, and can stifle innovation—even processes that were initially developed to be agile. An agile culture, however, will continuously improve and adapt without the need for periodic change initiatives. Why Agile Works: The Values Behind the Results focuses on why and how agile works and where agile should take organizations in terms of values. Here you’ll learn: - Why agile fails most often - How culture determines results - The difference between values and beliefs - A

NEventStore PollingClient does nothing

For my next project we’ll use Event Sourcing. Therefore I’m spending some free time in looking at NEventStore , a persistence agnostic Event Store for .NET. One of the features of NEventStore is a built-in PollingClient allowing you to poll the Event Store for the latest commits. However when I tried to test the PollingClient nothing happened?! Here is the code I was using: No exception was thrown, however when I browsed through the Output window in Visual Studio I noticed the following message: A first chance exception of type 'Newtonsoft.Json.JsonSerializationException' occurred in NEventStore.dll It seems that the PollingClient immediatelly tries to deserialize the committed events, as I didn’t include a reference to the assembly containing the Events, the deserializer (silently) fails. To fix it, the only thing I had to do was adding a reference to my Events assembly.

ASP.NET RedisSessionStateProvider - ERR unknown command 'EVAL'

After switching to the RedisSessionStateProvider   our ASP.NET application started to fail with the following error message: ERR unknown command 'EVAL' Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: StackExchange.Redis.RedisServerException: ERR unknown command 'EVAL' On StackOverflow I found that it could be related to an older Redis version as the EVAL command was introduced in Redis 2.6. A quick check using the INFO command revealed that I was indeed using an older version: After upgrading to a more recent version, the error went away!

Angular 1.5 - Stateless components

Angular 1.5 brings us ‘Components’, a special kind of directive that uses a simpler configuration. It is a first step towards Angular 2.0 where directives and controllers no longer exist and are replaced by a component-based model. Advantages and disadvantages of components From the Angular documentation : Advantages of Components: simpler configuration than plain directives promote sane defaults and best practices optimized for component-based architecture writing component directives will make it easier to upgrade to Angular 2 When not to use Components: for directives that rely on DOM manipulation, adding event listeners etc, because the compile and link functions are unavailable when you need advanced directive definition options like priority, terminal, multi-element when you want a directive that is triggered by an attribute or CSS class, rather than an element Most important to remember is that components ha

Hidden Azure Job offering

Fun fact;  when opening the Azure portal you get some nice ASCII art inside the debug console of your favorite browser and it even includes a job offering .

WIF: Enable tracing

WIF(Windows Identity Foundation) is not the most easy framework to use. The moment something goes wrong it’s not always transparent what actually happened leaving you no clue where to search for the root cause. Luckily Microsoft integrated great tracing functionality so you can have a look under the hood. To enable tracing, add the following configuration to your app.config/web.config file: Tracing information will be written to a file in XML format. However you can use the SVCTraceViewer tool to open and read the trace messages in a more user-friendly format.

Converting MS Access Reports to SQL Server Reporting Services Reports

I learned a neat trick from one of my colleagues today, something I wasn’t aware that it was even possible. Did you know that you can take an existing MS Access report and convert it to a SQL Server Reporting Services(SSRS) report? Me neither! And it fact, it’s quiet easy. Let me show it… Create a new SSRS project using the SQL Server Data Tools for BI(SSDT). Click on the PROJECT menu item, choose Import Reports and click on the Microsoft Access… menu item. Select the Access application you want to load the reports from and click OK . That’s it! Remark: Note that it is still possible you have to fix some errors after the import because not all Microsoft Access Report features are supported in SSRS.

CQRS with decoupled messaging series

Rishabh S Ajmera wrote a blog series about implementing a CQRS architecture with emphasis on decoupling messaging. Definitely worth checking out! A quick overview: Introduction Current article explaining the principles being followed. Need for Enterprise Servicebus Frameworks and Decoupled messaging with their samples We will look at samples from MassTransit and nServicebus documentation and will decouple publish subscribe from those samples. Inventory Manager - CQRS application (with decoupled messaging) - Commands Inventory Manager application will be introduced. It is implementation of Greg Young's Simple CQRS Example , however making it usable for real world. Currently Inventory Manager application implements only first usecase of creating an inventory item. The post will focus on sending command following CQRS architecture in Inventory Manager application. Inventory Manager - CQRS a

Enabling CORS in ASP.NET Web API

When testing some code I noticed that a specific AJAX call kept returning a 405 Method not allowed response . Although I was calling $.ajax({ type: "POST"}) behind the scenes the browser changed the request to an OPTIONS request. What was going on? What I didn’t notice at first sight was that the AJAX request was send to another domain, meaning I’m making a cross-origin HTTP request. For security reasons, browsers restrict cross-origin HTTP requests initiated from within scripts. Before you can do a cross-origin request, the browser will initiate a preflight CORS( Cross-Origin Resource Sharing ) check. This explains the OPTION request going out. It is up to the called API to handle this preflight check and return headers describing what’s allowed and not. Permission/Feature Request Header Response Header Origin Origin Access-Control-Allow-Origin HTTP method Access-Control-Request-Met

Error loading web project: The URL is configured to use IIS Express as the web server but the URL is currently configured on the local IIS web server.

Today I tried to do a code review but when I tried to load the solution in Visual Studio, it failed with the following error message: The URL is configured to use IIS Express as the web server but the URL is currently configured on the local IIS web server. To open this project, you must use IIS Manager to remove the bindings using this URL from the local IIS web server. I wanted to use IIS to host this web project, so I had to find out why it was trying to use IIS Express… Inside my csproj file everything looked correct: Strange! However there is also a csproj.user file and indeed  there the UseIISExpress settting was enabled: After changing this to false, I was able to load the web project and start my review.

Applying Scrum in your enterprise–Shu Ha Ri

As a consultant I spend a lot of time at different companies, giving me the opportunity to compare used practices, methodologies and tools. One of the things I noticed is that Agile has hit mainstream and is now applied almost everywhere. Most of the time, this means that companies are using Scrum or a derivative ScrumBut , WaterScrumFall ,… However, most companies make the same mistakes: Focussing too much on the Scrum ceremonies(Daily Scrum, Sprint Retrospective,…) without understanding the reasoning behind it Picking a subset of the Scrum concepts and ceremonies before first applying Scrum “from the book”, adapting the rules without knowing the importance of these rules Let’s use some Japanese wisdom and apply the Shu Ha Ri model of learning: This model shows the different stages that learners go through when learning new concepts: Shu—Follow rules to learn basics Ha—Break rules and discover context Ri—Mastery and find your own way If we apply this

OWASP WebGoat and Security Shepherd Projects

If you are new to (web application)security or want to extend your knowledge, the guys from OWASP created 2 great projects to get you started: OWASP WebGoat Project From the website: WebGoat is a deliberately insecure web application maintained by OWASP designed to teach web application security lessons. You can install and practice with WebGoat. There are other 'goats' such as WebGoat for .Net . In each lesson, users must demonstrate their understanding of a security issue by exploiting a real vulnerability in the WebGoat applications. For example, in one of the lessons the user must use SQL injection to steal fake credit card numbers. The application aims to provide a realistic teaching environment, providing users with hints and code to further explain the lesson. Links: Release: https://github.com/WebGoat/WebGoat/releases Project site: https://www.owasp.org/index.php/Category:OWASP_WebGoat_Project OWASP Security Shepherd From the website:

Front-end development Handbook

If you are new to front-end web development and have no clue where to start, I can recommend the Front-end Handbook written by Cody Lindley. The book briefly discusses all the topics relevant for front-end development, what’s important and what not and links to a large set of resources to help you grasp and understand each of these topics in more detail. It is the perfect learning path to help you getting started with front-end web development. More information: GitBook page: https://www.gitbook.com/book/frontendmasters/front-end-handbook/details Start reading: http://www.frontendhandbook.com/

Templates for Windows 10 Universal Apps

To speed up the creation of a Windows 10 Universal App, Intense created a set of free templates to get you started. From the site: Controls, templates, and tools for building Universal Windows Platform apps on Windows 10. The Intense toolkit consists of two parts; a library of controls and helpers distributed as NuGet package, and a Visual Studio extension with project templates for creating new UWP apps. Intense Templates Adds new project and item templates to Visual Studio 2015 for creating Universal Windows apps. The templates are available in both C# and Visual Basic flavors. Blank App Composition App Composition XAML App Content App Navigation App SplitView App You can download the required Visual Extension from the Visual Studio Gallery: https://visualstudiogallery.msdn.microsoft.com/b7076e96-d4ab-4150-b2c6-12730abd5666