I added the ability to handle delay signing to a project on GitHub: https://github.com/ryknuth/Fody
I added a test for this and everything builds fine locally. However, when I submit my PullRequest, it runs through AppVeyor which fails:
MSBUILD : error : Fody: An unhandled exception occurred: [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : Exception: [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : Strong-name signing is not supported on this platform. [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : Type: [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : System.PlatformNotSupportedException [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : StackTrace: [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : at System.Reflection.StrongNameKeyPair.get_PublicKey() [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : at InnerWeaver.FindStrongNameKey() in C:\projects\fody\FodyIsolated\StrongNameKeyFinder.cs:line 27 [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : at InnerWeaver.Execute() in C:\projects\fody\FodyIsolated\InnerWeaver.cs:line 112 [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : Source: [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : System.Private.CoreLib [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : TargetSite: [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : Byte[] get_PublicKey() [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj] MSBUILD : error : [C:\projects\fody\Integration\WithDelaySigning\WithDelaySigning.csproj]
Is there a way to enable signing or perhaps disable building this project in AppVeyor?
Solution which seems to work is replacing
dotnet build Integration\Integration.sln --configuration Release
with
msbuild Integration\Integration.sln /target:Restore
msbuild Integration\Integration.sln /p:Configuration=Release /verbosity:minimal
Not sure I deeply understand the underlying issue, but this should unblock you.
Side note: to disable building a project you can remove it from the configuration which you are building e.g. Release
in your case, in VS and saving the solution.