Nate McMaster

Software dev & infrequent blogger

Recent Posts

Shipping a cross-platform MSBuild task in a NuGet package

MSBuild allows users to write and register their own tasks. Tasks, unlike targets, can be written in C# and can perform build operations that would be impossible to write in MSBuild’s XML dialect. In this post, I’m going walk through the key pieces of how to write an MSBuild task that works on both the .NET Core command line and in Visual Studio, and then how to bundle that task into a NuGet package so the task can be shared and installed automatically into projects.

Old csproj to new csproj: Visual Studio 2017 upgrade guide

The leaner csproj in VS 2017 can save you hundreds of lines of code. What to cut, keep, and change to upgrade to VS 2017

You may have heard the buzz: .NET Core went from the project.json to csproj file format, and the new csproj format is leaner, easier to read, and adds new features. But what about your .NET Framework VS 2015 (or 2013) project? How can you participate in the VS 2017 goodness? Keep reading: I’ll show you some of the major changes, and how to upgrade to VS 2017.

Part 2 - Caveats of project.json to MSBuild conversion

To convert is to change form, function, or beliefs. There will lots of this.

This upgrade is not only a matter changing JSON vs XML: it’s about learning and using a fundamentally different technology, MSBuild. Regardless of how big or small your .NET Core project is, you are likely to run into some subtle, big, and bewildering changes to how your build system as you convert. Here is a collection of obvious and not-so-obvious caveats to the MSBuild conversion process.

Project.json to MSBuild conversion guide

If you been given the unenviable task of migrating your .NET Core project from ‘project.json’ to MSBuild (csproj), you are likely to find your muscle memory disrupted and the documentation lacking. Automated upgrades in Visual Studio and .NET Core CLI may auto-generate a csproj file for you, but they won’t tell you how to do things you already know how to do in project.json. Here is the most exhaustive list I can create of all the project.json knobs as they exist in Microsoft.NET.Sdk.

See more posts...