Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publishing error after updating to Visual Studio 2017 v15.8.2

Last week, my code was working perfectly. Now, after downloading and installing 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

like image 971
EmilioV Avatar asked Aug 30 '18 13:08

EmilioV


1 Answers

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.

like image 156
Chris Gonzales Avatar answered Oct 22 '22 22:10

Chris Gonzales