.net-corevisual-studio-2017.net-core-1.1

.NetCoreApp 1.1 - Default Visual Studio 2017 .NET Core Project Broken?


I'm starting today to try and get to grips with the new .NET Core framework. So I installed Visual Studio 2017 Enterprise and .NET Core Workload as per the following link:

https://www.microsoft.com/net/core#windowsvs2017

I thought I would give a go at creating Class Library, so I created a new .NET Core Library project, which defaults to target framework .NETCoreApp 1.1:

The following is taken from the project properties

Now when the solution is created, the Nuget package restore fails for every package and not even System namespace is referenced correctly. FYI, the full error output for the restore can be found here (pastebin).

Now if I can change the target framework to .NETCoreApp 1.0 then the errors clear themselves up. So this is the confusion for myself a Core nOOb - I see 1.1 is available, but can i use it for Class Libraries or should i be targeting 1.0?

Also, my nuget source is the following:

https://api.nuget.org/v3/index.json

UPDATE:

I do seem to have the 1.1 SDK installed: enter image description here


Solution

  • In the end I uninstalled all of the .NET SDK references (Windows: Add or Remove Programs) and re-installed .NET Core using the Visual Studio 2017 workload using the Visual Studio Installer:

    enter image description here

    ReSharper Users:

    I had to open the Solution I have created, re-save it (for some reason), close Visual Studio, then re-open the Solution - this fixed issues with red squiggly lines everywhere and incorrect errors with "Cannot reference....".