gpt4 book ai didi

c# - NETSDK1061 : The project was restored using Microsoft. NETCore.App 版本1.0.0,但使用当前设置,将使用版本2.0.9

转载 作者:可可西里 更新时间:2023-11-01 03:06:44 25 4
gpt4 key购买 nike

我正在开发移动应用程序并使用 MS App Center for CI。昨天,单元测试项目未能在 App Center 中构建,出现以下错误。我无法在任何开发人员机器上重现该问题,此错误仅发生在 App Center 中。

error : NETSDK1061: The project was restored usingMicrosoft.NETCore.App version 1.0.0, but with current settings,version 2.0.9 would be used instead. To resolve this issue, make surethe same settings are used for restore and for subsequent operationssuch as build or publish. Typically this issue can occur if theRuntimeIdentifier property is set during build or publish but notduring restore. For more information, seehttps://aka.ms/dotnet-runtime-patch-selection.

他们的付费支持只是提供基础知识、清理项目、回滚我的最后一次提交等。以前有人在 App Center 上遇到过这个问题吗?

最佳答案

您需要设置相同的发布和构建运行时间

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<RuntimeFrameworkVersion>2.1.0</RuntimeFrameworkVersion> --> fix publishing issues
<PlatformTarget>AnyCPU</PlatformTarget> --> fix publishing issues
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Microsoft.NETCore.App" Version="2.1.0" /> --> fix building issues
<ProjectReference Include="..\PublicSonar.Monitor.Persistent.Json\PublicSonar.Monitor.Persistent.Json.csproj" />
</ItemGroup>
</Project>

关于c# - NETSDK1061 : The project was restored using Microsoft. NETCore.App 版本1.0.0,但使用当前设置,将使用版本2.0.9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53720678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com