Ivan's Brain Dump


Farewell project.json

There was a fairly important update from Microsoft last week, which I personally felt went a bit under the cover.

The .NET Core (and other teams) have decided to drop project.json and go back to MSBuild and *.csproj. This is not something that’s already happened in the just released .Net Core RC2 and ASP.NET Core RC2, but it’s happening.

Wondering where that announcement was made? As far as I know - there wasn’t necessarily one. It was mentioned in the stand-up (see the video at the end of this post).

This is fairly disappointing, because the project.json was a breath of fresh air. However it’s understandable (to an extend):

  • It would make the transition of existing Visual Studio solutions to .NET Core straightforward
  • It’s a huge change. It will enable leveraging existing investment in CI/RM based around MSBuild.
  • There is a lot going on under the hood during build in MSBuild. Think incremental compilation, resolving build-time dependencies, configuration management and tons more (hidden behind the e.g. Microsoft.CSharp.targets imported by every project). And all of that will have to be re-implemented.
  • Too much work to ship dotnet cli on time - remember that it’s no longer just about ASP.NET Core, but also console apps, UWP apps, Xamarin apps.
  • The .NET core team would have eventually ended up probably implementing/re-implementing parts of MSBuild.

Still that doesn’t make me happier right now.

Hello MSBuild and .csproj

Appears this is what will happen in future releases:

  • *.xproj will be replaced by *.csproj
  • Features in project.json will start getting merged back into the the *.csproj
  • It is not yet clear what they are going to do about the packages list, but it was mentioned they might keep it as json under nuget.json or merge it into the .csproj. GitHub issue tracking this here: https://github.com/aspnet/Home/issues/1433
  • Supposedly that transition should be smooth and potentially automatic if using Visual Studio

The good news is that:

Announcement video

Blog Logo

Ivan Zlatev



Ivan's Brain Dump

Back to Overview