更新到 Visual Studio 2017 v15.8.2 后发布错误 [英] Publishing error after updating to Visual Studio 2017 v15.8.2

查看:31
本文介绍了更新到 Visual Studio 2017 v15.8.2 后发布错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上周,我的代码运行良好.现在,在下载并安装更新15.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:该项目是使用 Microsoft.NETCore.App 版本 2.1.3 恢复的,但根据当前设置,将改用版本 2.1.3-servicing-26724-03.要解决此问题,请确保将相同的设置用于还原和后续操作(例如构建或发布).通常,如果在构建或发布期间设置了 RuntimeIdentifier 属性,而不是在还原期间设置了 RuntimeIdentifier 属性,则会发生此问题.有关详细信息,请参阅 https://aka.ms/dotnet-runtime-patch-选择.".

"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.".

注意:如果我移动到另一台装有 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>binRelease
etcoreapp2.1publish</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) 然后重新安装.

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

这是 15.8.2 中的错误.

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

You can download the Core SDK for the reinstall here.

这篇关于更新到 Visual Studio 2017 v15.8.2 后发布错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆