- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在开发移动应用程序并使用 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/
我是一名优秀的程序员,十分优秀!