See https://github.com/dotnet/cli/issues/4788#issuecomment-264126559
When I manually update
<TargetFramework>netcoreapp1.0</TargetFramework>to<TargetFramework>netcoreapp1.1</TargetFramework>in the .csproj file, Visual Studio is unable to open the project file (Error message: "Value cannot be null. Parameter name: key")
@kurtdevocht also reports that it builds and runs fine on the command line so the issue is somewhere on the VS side.
@jinujoseph @srivatsn @natidea
I did not try to repro. Perhaps this has already been fixed since RC?
I tried on latest d15rel/15.0.26001.0, seems to work.

Can you confirm that it repros on RC?)I'm locked out of corpnet today, which is why I didn't try myself.) If so, we can be sure this is fixed and not that we're just missing a repro step.
@jinujoseph Can you check what happens if you:
1) Close Visual Studio
2) Set Microsoft.NETCore.App to V. 1.1.0
<PackageReference Include="Microsoft.NETCore.App">
<Version>1.1.0</Version>
</PackageReference>
3) Do a dotnet restore and dotnet build on the command line => This succeeds on my system
4) Try to reopen the project/solution with VS2017 => Opening the project fails on my system
I can repro what @kurtdevocht is seeing. A new WebApplication can be created in VS2017, edited to netcoreapp1.1. The project can be unloaded loaded or removed and readded ok. If I exit VS and reload the sln, then VS throws the error. I also tried with switched Microsoft.NET.Sdk to ver: 1.0.0-alpha-20161203-1-150.
The VsProjectFault:
https://gist.github.com/dbeattie71/8b1bb8b63c7a6e007fbc6c4533a8f681
Thanks for the repro, we'll take a look.
I can confirm this issue with VisualStudio 2017 RC, but I set the framework to netcoreapp1.1 through Project -> Properties, then updated a bunch of NuGet packages.
In my case, deleting obj and bin folders makes the trick, and projects can be loaded again.
I have the same issue with the last version of vs2017. When I updated all packages(include Microsoft.NETCore.App to 1.1.0) with netcoreapp1.0, everything goes fine. But after change netcoreapp to 1.1, the project can't be opened by VS. When I change netcoreapp to 1.1 first, then update all packages, a "c" driver directory appears in project.
@BladeWise : Can confirm that deleting bin and obj folder will allow you to load the project again but only to see it crash with the same error after a few seconds.
@sweetwxh : Got the c: folder here as well and was wondering what it is.
Same issue here ("Value cannot be null. Parameter name: key", also "error : The given trees are not related. Parameter name: oldTree"). Can reproduce this by creating a new NETCore WebAPI project and then updating the packages and the framework from 1.0 to 1.1. Reload the solution and boom, the project fails to load. Removing the bin/ and obj/ folders does help, and the project reloads, but then there's the "C:" folder that appears. If you reload the project again, the same error appears again.
@jviau @adrianvmsft @lifengl does the issue with the oldTree look familiar to you guys? I seem to remember seeing a CPS issue around this.
I recently fixed an error regarding the fault provider (that displays that a project could not be loaded) that was causing the tree not related issue.
The other issue (value cannot be null) is something I have been trying to figure out for a while, but didn't have a repro so far. I will give it a try, thanks for the heads up!
Good news, I managed to get it to repro, thanks for the detailed steps above!
This crash is tracked with internal bug 362077
Another related issue: https://github.com/aspnet/Tooling/issues/890
The issue happens when you have an absolute glob on a different drive than the project.
E.g.: project file is on D: but it has a glob like:
<Compile Include="C:\Foo\**\*.cs" />
In this case, I was able to repro the issue by having the project file on a different drive (D:) because some nuget package restores files to the user folder that is on C and I think there is a glob that includes them:
C:\Usersfoo.nuget\packages\microsoft.diasymreader.native\1.4.0\runtimes\win\native
Microsoft.DiaSymReader.Native.amd64.dll
Microsoft.DiaSymReader.Native.x86.dll
A possible workaround is to move your project on the same physical drive as the OS.
@srivatsn You may want to mark this bug as Tracking, it is on the CPS side and we are tracking it internally.
A fix for this got checked in today in CPS.
Most helpful comment
I have the same issue with the last version of vs2017. When I updated all packages(include Microsoft.NETCore.App to 1.1.0) with netcoreapp1.0, everything goes fine. But after change netcoreapp to 1.1, the project can't be opened by VS. When I change netcoreapp to 1.1 first, then update all packages, a "c" driver directory appears in project.