-
-
Notifications
You must be signed in to change notification settings - Fork 802
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appveyor (CI): Strong name signature verification error fails builds & blocks next version release #1340
Comments
From my limited time testing, I can reproduce the issue on my Windows machine as well, running this command in the project root: dotnet test --configuration Release .\tests\Moq.Tests\Moq.Tests.csproj It produces the same errors as AppVeyor. Removing the Test target in the AppVoyer config allows it to build at the cost of the tests not running. Ultimately it's up to you how you want to proceed. https://ci.appveyor.com/project/david-kalbermatten/moq4/builds/47263465 |
More specifically the DLL produced by the build cannot be validated by sn.exe ."C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7 Tools\x64\sn.exe" -vf .\tests\Moq.Tests.FSharpTypes\bin\Release\net472\Moq.Tests.FSharpTypes.dll
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
Failed to verify assembly -- Strong name validation failed. I tried a few things but couldn't figure out why it fails. |
Ok, I may have figured out a way around it. You can resign the Assembly before running the tests, by calling the sn.exe like so: ."C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7 Tools\x64\sn.exe" -R .\tests\Moq.Tests\bin\Release\net472\Moq.Tests.FSharpTypes.dll .\Moq.snk Now when running the tests with the release configuration without rebuilding, it doesn't produce the errors anymore. dotnet test --no-build --configuration Release .\tests\Moq.Tests\Moq.Tests.csproj How this can be achieved on AppVeyor, I cannot say. I guess the single call of |
Aight, I think I managed to fix it for the time being. Please have a look at my PR #1346 |
Merged! Thanks @david-kalbermatten ! |
Something must have changed with build tools sometime in the last few months, we're not getting errors such as this one during Appveyor CI builds:
Not sure what is going on there. Unfortunately, this fails the build, which in turn blocks PRs and also releasing a new version of Moq with the latest changes.
If anyone knows what is going wrong here, help is appreciated.
The text was updated successfully, but these errors were encountered: