Got this error today after upgrading VS2017 to v15.8.2 and trying to build my dotnet core project (target framework .NET Core 2.1):
Severity Code Description Project File Line Suppression State Error NETSDK1061: The project was restored using Microsoft.NETCore.App version 2.1.3, but with current settings, version 2.1.3-servicing-26724-03 would be used instead. To resolve this issue, make sure the same settings are used for restore and for subsequent operations such as build or publish. Typically this issue can occur if the RuntimeIdentifier property is set during build or publish but not during restore. For more information, see https://aka.ms/dotnet-runtime-patch-selection.
What to do?
Found out solution:
Uninstall .NET Core SDK 2.1.401, that came with vs2017 v15.8.2 and install it again using an installer from the .NET Downloads page.
Source: @joshuadavidson https://github.com/dotnet/cli/issues/9897
Also quote @peterhuene:
"It's come to my attention that VS 15.8.2 did not include the correct, final build of the 2.1.401 SDK. We are working on resolving this issue. In the meantime, uninstalling the 2.1.401 SDK installed by Visual Studio and installing the SDK from the .NET Downloads site should correct the issue."
Update, September 7th 2018:
"Visual Studio 2017 version 15.8.2 contained a pre-release build of .NET Core SDK 2.1.401 that is incompatible with Visual Studio. We have corrected this issue with Visual Studio 2017 version 15.8.3."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With