ASPNET Core publish error: project was restored using X version Y would be used instead
A quick post to vent my frustration after spending a few hours trying to deploy a self contained ASP.NET Core app. I was going to deploy a portal for our Konstrukt implementation consultants, but the deploy folder would be empty and I kept getting this error when publishing from the commandline:
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.
Command:
dotnet publish -c Release -r win10-x64
[caption id=“attachment_36683” align=“aligncenter” width=“580”]Where are my files?[/caption]
I found anissue on Github that seemed to be the exact problem I was having, but the none of the suggested solutions helped. Until I ran the latest Visual Studio update (I was only one version behind). Arghhhh!!!! Anyways. If you have the same problem, run your updates, and if you have already done that try installing the .NET Core SDK again as suggested by one of the devs in the thread. Certainly solved it for me.
[caption id=“attachment_36673” align=“aligncenter” width=“619”]I now have my files. and no errors when I publish.[/caption]
Comments
Last modified on 2018-09-13