gpt4 book ai didi

c# - 在框架 "netcoreapp2.0"和 RID "debian.8-x64"上使用 PostSharp 构建错误

转载 作者:太空宇宙 更新时间:2023-11-03 12:14:43 26 4
gpt4 key购买 nike

我有一个针对 net461 (win7-x64) 和 netcoreapp2.0 (debian.8-x64) 的项目。

当我在桌面上构建项目时,一切都运行良好。构建由 VS 或命令行完成:

dotnet publish -c "Release"-o "xxxx"-f "net461"-r "win7-x64"xxxxx.csproj

dotnet publish -c "Release"-o "xxxx"-f "netcoreapp2.0"-r "debian.8-x64"xxxxx.csproj

但是当它由我们的构建服务器完成时(由 Gitlab 触发并由 Powershell 中的 Gitlab Runner 运行),所有内容都在 net461 中正确构建,但在 netcoreapp2.0 中构建失败.

错误似乎是由 Postsharp 产生的。对于 5.1.3-alpha 版本,我有一个关于找不到程序集的错误:

Error PS0264: Cannot find the assembly 'flexcel, version=6.19.0.0, culture=neutral, publickeytoken=cb8f6080e6d5a4d6'. Build your project with detailed verbosity to see the assembly loading log.

=> 奇怪的是,程序集的大小写不正确,是 Flexcel,而且在 net461 中运行良好。

所以我尝试将 Postsharp 更新到 5.1.9-preview,但现在我遇到了另一个错误:POSTSHARP30

Error : [C:\Build\Gitlab\Runner\builds\17fef169\0\xxxx.csproj] C:\Windows\system32\config\systemprofile.nuget\packages\postsharp\5.1.9-preview\build\PostSharp.targets(340,5): error : The process "C:\Windows\system32\config\systemprofile.nuget\packages\postsharp\5.1.9-preview\build\PostSharp-Tools.exe" failed with exit code 2. [C:\Build\Gitlab\Runner\builds\17fef169\0\xxxx.csproj]

对于这两个版本(5.1.3-alpha 和 5.1.9-preview),如果我登录构建服务器并在控制台中运行 dotnet publish 命令,它运行良好。仅当 CI 构建过程完成此操作时才会出现此问题。

有没有人遇到过同样的错误?

谢谢。

吕克

最佳答案

PostSharp 尚不支持在 Linux 上构建。

关于c# - 在框架 "netcoreapp2.0"和 RID "debian.8-x64"上使用 PostSharp 构建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50365578/

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