-1

I am following a video on PluralSight and I went to github.com/aspnet/Mvc to download the source files and follow along.

When I downloaded the files and tried to run the program, I ended up with:

Severity Code Description Project File Line Suppression State Error The current .NET SDK does not support targeting .NET Standard 2.0. Either target .NET Standard 1.6 or lower, or use a version of the .NET SDK that supports .NET Standard 2.0. Microsoft.AspNetCore.Mvc.Formatters.Xml C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.TargetFrameworkInference.targets 126

I have also followed this post and downloaded the 2.0 Core separately, but it is still giving me this error. Even after I updated to Visual Studio 15.3.

Any help is greatly appreciated. Thank you!

Edit

After deleting the source files and re-cloning the project I open the project and I am now getting this error:

Severity Code Description Project File Line Suppression State Error KRB1001 Package references have not been pinned. Run './build.cmd /t:Pin'. Also, you can run './build.cmd /t:Restore' which will pin and restore packages. 'build.cmd' can be found in 'C:\Users\ty_lo\source\Mvc\'. VersioningWebSite C:\Users\ty_lo\source\Mvc\Directory.Build.targets 12

Maciej Jureczko
  • 1,560
  • 6
  • 19
  • 23
giggidy
  • 75
  • 1
  • 1
  • 8

1 Answers1

0

FIX: I seemed to have fixed my solution by going to Tools -> Options -> NuGet Package Manager -> General and then making sure the "Automatically check for missing packages during build in Visual Studio" is checked.

giggidy
  • 75
  • 1
  • 1
  • 8