Update ASP.NET Core web application to .NETCoreApp1.1 causes a project loading failure

If you are using Visual Studio 2017 RC to develop an ASP.NET Core web application, you maybe will have this stressful problem, which will unload your web application project after updating this project to target the framework .NETCoreApp1.1. This loading project will appear after rebuild your project, and close the Visual Studio 2017 RC instance (you can have some other little issues before closing your VS instance).

When you will re-open your project with Visual Studio, your asp.net core web application will be not load and you will have this error message from visual studio :

Update ASP.NET Core web application to .NETCoreApp1.1 causes a project loading failure

In the log file, you will have something like this :


=====================
12/01/2017 13:16:45
Recoverable
System.AggregateException: One or several errors occured. ---> System.ArgumentNullException: The value cannot be null.
Name of parameter : key
   Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.EnsureNotFaultedTree(IProjectVersionedValue`1 appliedValue)
   Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.<PublishTreeAsync>d__66.MoveNext()
   --- Fin de la trace de la pile d'exception interne ---
---> (Exception interne #0) System.ArgumentNullException: The value cannot be null.
Name of parameter : key
   Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.EnsureNotFaultedTree(IProjectVersionedValue`1 appliedValue)
   Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.TreeService.<PublishTreeAsync>d__66.MoveNext()<---
===================

The solution is simple, and takes just a few seconds to complete. There is the steps to follow :

January 12, 2016
  • ASP.NET Core
  • ASP.NET Core Web Application
  • Visual Studio 2017 RC
  • .NETCoreApp1.1