fix(nunit): remove assembly qualified names from fullName#571
Merged
Conversation
epszaw
approved these changes
Aug 5, 2025
3 tasks
This was referenced Dec 23, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
In some cases, assembly-qualified names are included in fullName values of NUnit test results, which leads to two problems:
int's assembly-qualified name includes the version of the target framework (e.g.,System.Int32, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e). That means, this name changes each time the tests are compiled against a new version of .NET.An example of a context where such an issue occurs is a test with a parameter of a generic type:
Example
Given the following test:
When run, the result of such a test will receive the following
fullName:Here, the
[[System.String, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]part is both framework-dependent (Version=8.0.0.0ofSystem.Private.CoreLibcorresponds to .NET 8.0) and redundant (it follows by a more compact yet sufficient name of the type,System.String).Solution
The reason this behavior occurs is that we use
System.Type.FullNamewhen calculating full names. This PR precludes it.Fixes #418.
Checklist