6

Last week it was working perfectly!!!

Now, after download and install the update "15.8.2", when I try to publish my app the final step is failing. I mean, while the build process is carried out with no problem, the publish process is returning with the following 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.".

Note: If I move to another PC with Vs2017 (15.8.1) everything works as expected.

Please, do not mark this question as duplicated, because it is not. I have already read all the post, blogs, answers out there, but none of them give a real solution. I haven't upgraded any package to 2.1.2 nor 2.1.3, all my packages are referencing 2.1.1, with no exception. I have double checked all my configurations and everything seems to be okay , I've followed all the guidelines out there and nothing seems to be the real solution.

Note: My publishing settings are the following:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <WebPublishMethod>FileSystem</WebPublishMethod>
        <PublishProvider>FileSystem</PublishProvider>
        <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
        <LastUsedPlatform>Any CPU</LastUsedPlatform>
        <SiteUrlToLaunchAfterPublish />
        <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
        <ExcludeApp_Data>False</ExcludeApp_Data>
        <ProjectGuid>73d9d7f6-a8ff-4543-99e0-6af66bba4509</ProjectGuid>
        <publishUrl>bin\Release\netcoreapp2.1\publish\</publishUrl>
        <DeleteExistingFiles>True</DeleteExistingFiles>
        <TargetFramework>netcoreapp2.1</TargetFramework>
        <SelfContained>false</SelfContained>
        <_IsPortable>true</_IsPortable>
        <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    </PropertyGroup>
</Project>

As you can see, my deployment is not Self-Contained. It is framework dependand

EmilioV
  • 162
  • 7

1 Answers1

11

Uninstall Microsoft .NET Core SDK 2.1.401 (x64) then reinstall.

This is a bug in 15.8.2.

You can download the Core SDK for the reinstall here.

Chris Gonzales
  • 1,102
  • 1
  • 11
  • 28
  • 2
    Thank you. Yes...it works for me. MS should be taking more care when delivering the VS updates. This is happening with more and more frequency. – EmilioV Aug 30 '18 at 15:55
  • Visual studio still complains if I build via the command line, but this does at least enable me to build via the command line OR via visual studio again. – HockeyJ Oct 05 '18 at 10:09
  • 1
    Thanks, this really put me on the right path to solve a similar problem I experienced on final release of VS2019, only ever having had VS2017 installed before that. Might I suggest you generalize your answer not to included specific versions and more general advice to uninstall all instance `Microsoft. NET Core SDK` and install latest from https://dotnet.microsoft.com/download/dotnet-core/. – Jonathan L. Apr 05 '19 at 06:46