Fix NU1009 CPM conflict for xunit.v3.core#16608
Merged
steveisok merged 1 commit intodotnet:mainfrom Mar 19, 2026
Merged
Conversation
XUnitV3.targets defines xunit.v3.core as an implicit PackageReference (IsImplicitlyDefined=true) with Version set directly. NuGet CPM forbids implicit references from also having a <PackageVersion> entry in Directory.Packages.props — this caused NU1009 on any project importing the targets (e.g., Ubuntu2404_Ubuntu_BuildTests_x64 leg). Fix: - Remove the redundant <PackageVersion Include="xunit.v3.core"> from Directory.Packages.props - Mark the direct reference in XUnitAssert.Tests.csproj as implicit with an inline Version, matching the pattern from XUnitV3.targets (this project sets DisableArcadeTestFramework=true so doesn't get the targets-based reference) Regression introduced by arcade commit 3290ea9 ("Add xunitv3assert dotnet#16555"). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
lewing
approved these changes
Mar 18, 2026
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.
Problem
Arcade commit 3290ea9 ("Add xunitv3assert #16555") introduced a NuGet Central Package Management (CPM) conflict:
XUnitV3.targetsdefinesxunit.v3.coreas an implicitPackageReference(IsImplicitlyDefined="true") withVersionset directlyDirectory.Packages.propsalso defines a<PackageVersion Include="xunit.v3.core">entryNuGet CPM rule: implicit PackageReferences cannot have a corresponding
<PackageVersion>entry — they must setVersiondirectly on the<PackageReference>item. This results in NU1009 on any project that imports XUnitV3.targets.This breaks the
Ubuntu2404_Ubuntu_BuildTests_x64leg (the only leg running with/p:DotNetBuildTests=true) in the unified-build pipeline.Failing build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1341950
Fix
<PackageVersion Include="xunit.v3.core">fromDirectory.Packages.propsXUnitAssert.Tests.csprojas implicit with an inlineVersion— this project setsDisableArcadeTestFramework=trueso it doesn't get the targets-based reference and needs its own versionValidation
Both
XUnitV3Extensions.csprojandXUnitAssert.Tests.csprojrestore cleanly after the fix. No other.csprojfiles in the repo have directxunit.v3.corereferences.