BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News .NET Core Tools Switch to MSBuild

.NET Core Tools Switch to MSBuild

The desire for .NET Core and ASP.NET Core to comfortably support platforms beyond Visual Studio running on Windows led Microsoft to create a project system based on project.json format.  Unfortunately, this new format led to incompatibility with the previous system based on .csproj/MSBuild.  Microsoft's Rich Lander has announced that the .NET Core tools will be migrating to the MSBuild format in a new alpha release.

Since developers using .NET Core today already rely on the project.json format, Microsoft has built a migration tool (invokable via dotnet migrate) which is designed to convert these files to the MSBuild format.

This change in format provides many helpful benefits, including:

  • Project to project references now work – References can be made between existing .NET Standard based projects (.NET Framework, Xamarin, or UWP) and .NET Core.
  • Project and NuGet references are declared similarly, both in csproj – Packages added via NuGet are properly referenced in the csproj file.
  • csproj project files can be manually edited while the project is open – Microsoft doesn’t see this as a day-to-day task, but editing csproj files in Visual Studio with IntelliSense support is possible.

When opening project.json based projects in VS2017RC (or newer), a dialog will appear prompting for confirmation to begin a one-way conversion to the .csproj format.  Do note that this in fact a one-way process, so be sure to have backups are made before proceeding.  Those developers using the .NET Core CLI Tools will find that they have also been updated to use the MSBuild-based system. 

Lander notes that this release of the Core Tools is considered an alpha release, and should be treated as such.  The tools are available for download on all .NET Core supported platforms (Windows, macOS, and Linux).

Rate this Article

Adoption
Style

BT