允许强名称签名

Allow strong-name signing

我在 GitHub 上为项目添加了处理延迟签名的功能: https://github.com/ryknuth/Fody

我为此添加了一个测试,一切都在本地构建良好。但是,当我提交 PullRequest 时,它通过 AppVeyor 运行失败:

MSBUILD:错误:Fody:发生未处理的异常:[C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:异常:[C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:此平台不支持强名称签名。 [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:类型:[C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:System.PlatformNotSupportedException [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:StackTrace:[C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:在 System.Reflection.StrongNameKeyPair.get_PublicKey() [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:在 C:\projects\fody\FodyIsolated\StrongNameKeyFinder.cs:line 27 [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] 中的 InnerWeaver.FindStrongNameKey() MSBUILD:错误:在 C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 112 [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] 中的 InnerWeaver.Execute() MSBUILD:错误:来源:[C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:System.Private.CoreLib [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:TargetSite:[C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:字节 [] get_PublicKey() [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD:错误:[C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj]

有没有办法在 AppVeyor 中启用签名或禁用构建此项目?

似乎有效的解决方案正在替换

dotnet build Integration\Integration.sln --configuration Release

msbuild Integration\Integration.sln /target:Restore
msbuild Integration\Integration.sln /p:Configuration=Release /verbosity:minimal

不确定我是否深刻理解了潜在的问题,但这应该可以解除你的阻碍。

旁注:要禁用构建项目,您可以将其从正在构建的配置中删除,例如Release 在你的情况下,在 VS 中并保存解决方案。