.net-standard - 基于 appveyor .NET Standard 2.0 构建

标签 .net-standard appveyor .net-standard-2.0

我将我的项目 ( https://github.com/MarkKhromov/The-Log) 迁移到 .NET Standard 2.0,但我的应用程序构建已损坏。我该如何解决这个问题?

我的解决方案包含:

  • .NET 标准项目
  • 控制台应用程序项目
  • 类库(测试)项目

我已经试过写道:

dotnet: 2.0.0
script:
  - dotnet restore
  - dotnet build

- dotnet build TheLog/TheLog.csproj -c Release -f netstandard2.0
- msbuild TheLog.Demos/TheLog.Demos.csproj /p:Configuration=Release
- msbuild TheLog.Tests/TheLog.Tests.csproj /p:Configuration=Debug
- nunit-console TheLog.Tests/TheLog.Tests.csproj

但每次我都会出错

最佳答案

需要更改 AppVeyor 上的两个设置。
1. 将Build worker image更改为Visual Studio 2017 - 环境设置
2. 将“dotnet restore”命令添加到 Before build script 作为 CMD - Build setting

我已经在 .NET Standard 2.0 或 .NET Core 2 上的一个新的空项目/解决方案集上确认了这一点。

关于.net-standard - 基于 appveyor .NET Standard 2.0 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46121024/

相关文章:

c# - 在适用于 .NET 的 Azure 管理库中创建具有多个声明的 Azure 服务总线策略

c# - C# 8.0 是否支持 IAsyncEnumerable?

linux - AppVeyor - Ubuntu 未被识别为图像

docker - 基于windowsservercore的docker下载问题(Appveyor, Visual Studio 2017)

.net-core - .NET Standard 2.0和System.Security.Cryptography.ProtectedData.Protect

visual-studio-2017 - 使用 nuget 包时,有没有办法避免使用 netstandard 程序集来支持 PCL?

c# - 无法为 Rfc2898DeriveBytes 指定 4 个参数(哈希算法名称)

c# - .Net Standard 1.6 中的 TypeConverter 替代方案

nuget - 排除从 .NET Standard 中的 nuget 包构建的库

powershell - PowerShell:将每个子目录添加到路径