Blog
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 :
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 :
- 1 Close your instance of Visual Studio 2017 RC
- 2 Delete all bin and obj objects of your web application project
- 3 Re-open your solution in Visual Studio 2017 RC, your .NETCoreApp 1.1 project will be correctly loaded
- 4 Add the NuGet package : Microsoft.DiaSymReader.Native, version 1.5.0-beta2-24728
January 12, 2016