-
Notifications
You must be signed in to change notification settings - Fork 68
feat: strong names for published assemblies #586
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Hey @delatrie any update \ ETA on when this PR will be pushed? Looking forward to it. |
Contributor
Author
|
@darrenge very soon. There are some minor msbuild-related fixes left that need to be applied. Hopefully, it will be done in a day or two. |
23e9105 to
aff6d20
Compare
5df7cd0 to
46db7ad
Compare
5d3eabd to
7aba571
Compare
epszaw
approved these changes
Oct 7, 2025
|
@delatrie -- when will this be released in nuget package vs just being in code base? Thanks for taking care of it. |
Contributor
Author
|
@darrenge will push it in a moment, sorry for the delay |
This was referenced Dec 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
The PR introduces strong names for assemblies of the following packages:
Other packages can't use strong names because they rely on
Lib.Harmony, which isn't strong-named. These are:Since SpecFlow is already deprecated by Tricentis, it's unlikely we'll implement strong names for Allure.SpecFlow.
As for Allure.Xunit, it's currently incompatible with .NET Framework, which is an issue on its own (see #589) and should be addressed first. Then, once we find a replacement for harmony (#369), we can make Allure.Xunit strong-named.
Signing and AspectInjector
We use Aspect Injector to implement
[AllureStep],[AllureBefore],[AllureAfter]and some other aspects. The way it works makes the assembly's signature invalid. Such a signature should then be updated withsn.exe, which is a part of the Visual Studio installation on Windows machines. Otherwise, loading the assembly on .NET Framework throwsCould not load file or assembly '<assembly>' or one of its dependencies. Strong name signature could not be verified.The PR updates the publishing workflow to run on Windows and to use
vswhere.exe(which is a part of thewindows-latestimage) to locate the Visual Studio installation folder. It then uses the Developer PowerShell tool in that folder to locatesn.exe. The path tosn.exeis forwarded to an MSBuild target via theAllure_SnExePathproperty. The target runs after Aspect Injector changes the assembly. It updates the signature by callingsn.exe -Ra <assembly>. After that's done, the assembly passes thesn.exe -vf <assembly>check. The resigned assembly is uploaded to NuGet.Resigning during development
This resigning routine isn't required during development because our test/sample projects target a modern .NET runtime (8.0 at the time), which doesn't verify strong names. If, for some reason, a developer needs valid signatures, they should set the
Allure_SnExePathenvironment variable. Use./build/findvstool.ps1to find the correct path:Obviously, this only works (and makes sense) on Windows.
AspectInjector update
The PR updates AspectInjector to version 2.9.0, which runs natively on Apple Silicon. This makes the workaround added via #396 unnecessary, so the PR removes it as well.
Other changes
publish.PackageReleaseNotesfrompublish.ymlinstead ofDirectory.Build.props.Allure_inDirectoryBuild.targetsto prevent collisions.Closes #376
Closes #391