VS2017 15.8.2发布错误(.NET Core 2.1)

问题描述:

上周运行良好!!!

现在,下载并安装更新 15.8.2后,当我尝试发布我的应用程序时,最后一步失败了。我的意思是,虽然构建过程没有问题,但是发布过程却返回了以下错误:

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:使用Microsoft.NETCore.App版本2.1.3,但使用当前设置,而将版本2.1.3-servicing-26724-03替换为解决此问题,请确保将相同的设置用于还原和后续操作,例如构建或发布。如果在构建或发布过程中设置了RuntimeIdentifier属性,而在还原过程中未设置RuntimeIdentifier属性,通常会发生此问题。有关更多信息,请参见 https://aka.ms/dotnet-runtime-patch-selection 。。

注意:如果我使用Vs2017(15.8.1)迁移到另一台PC,一切都会按预期进行。

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

请不要将此问题标记为重复,因为它不是。我已经阅读了所有帖子,博客和答案,但是没有一个提供真正的解决方案。我尚未将任何软件包升级到2.1.2或2.1.3,我的所有软件包均引用2.1.1,无一例外。我已经仔细检查了所有配置,一切似乎都还不错,我遵循了所有指南,似乎没有什么是真正的解决方案。

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.

注意:我的发布设置如下:

<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

卸载 Microsoft .NET Core SDK 2.1.401(x64)然后重新安装。

这是在1​​5.8.2中进行错误

您可以下载Core SDK以便重新安装此处

You can download the Core SDK for the reinstall here.