Add AssemblyTargetFramework to IExtensionNode - #1867
Open
HarnageaGabriel wants to merge 1 commit into
Open
Conversation
…r workaround IExtensionNode already exposed AssemblyPath and AssemblyVersion; add AssemblyTargetFramework (System.Runtime.Versioning.FrameworkName), populated the same way as AssemblyVersion from ExtensionAssembly.FrameworkName. PR #1861 (issue #839) worked around the missing property by having ConsoleRunner independently re-read the extension assembly's metadata via Mono.Cecil/TestCentric.Metadata just to determine its target framework. Now that the engine's own extension node exposes this directly, replace that workaround with a direct read of node.AssemblyTargetFramework and drop the now-unused TestCentric.Metadata dependency from the console project. Fixes #1866
CharliePoole
approved these changes
Aug 20, 2026
CharliePoole
left a comment
Member
There was a problem hiding this comment.
Looks good to merge. Thanks!
Member
|
@HarnageaGabriel You didn't request a review but I guessed you were done and reviewed it. You can merge or continue working if you wanted to add anything. In that case just re-request a review when you're done. In future, unless you prefer a particular person, you can just request a review from the engine core team and we'll all get notified. |
Member
|
@HarnageaGabriel Ping! |
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.
Summary
AssemblyTargetFramework(System.Runtime.Versioning.FrameworkName) toIExtensionNode, alongside the existingAssemblyPath/AssemblyVersion, populated the same way fromExtensionAssembly.FrameworkNameinExtensionNode's constructor.ConsoleRunner.DisplayExtensionpreviously had to independently re-read each extension assembly's metadata via Mono.Cecil/TestCentric.Metadata (GetTargetFrameworkDisplayName) just to display its target framework, since the interface didn't expose it. That method is now removed and the console readsnode.AssemblyTargetFrameworkdirectly. The now-unusedTestCentric.Metadatapackage reference is dropped fromnunit4-console.csproj(still used elsewhere in the solution, so the centralPackageVersionentry is untouched).Fixes #1866
Test plan
dotnet cake -t Test(viabuild.cmd -t Test) — full Build + Test succeeded (300/300 net462 non-skipped tests passed, 313/313 net8.0 non-skipped tests passed).build.cmd -t Packagefails locally withMSB4041onnunit.extensibility.api.csproj, but this reproduces identically on a clean checkout ofmainwith no changes applied — pre-existing local MSBuild-toolchain issue (old .NET Framework MSBuild 4.8 invoked by the Package task can't parse the SDK-style<Project Sdk=...>project), unrelated to this change.