Enable UsingToolNuGetRepack for exact version dependencies on all inter-package references#7569
Conversation
… inter-package references Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
|
This is very likely going to cause issues for MSTest as it will now require also an exact match of MTP which prevents users from updating even third-party extensions. I'm not sure what's best there to handle this. |
|
I was reviewing the created packages, for MTP everything seems to be good. For MSTest, we have the following:
@Youssef1313 are there some specific scenario you had/have in mind? |
|
My concern is the MSTest.TestAdapter -> MTP deps. I wouldn't expect it to be a strict equal. |
|
@copilot investigate how arcade works https://github.com/dotnet/arcade and try to make it so that MSTest to MTP deps are using either >= or range until the last major version of MTP. |
… separate repack batches Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
I investigated the Arcade SDK's The fix in
This leverages MSBuild's last-definition-wins behavior — since |
|
Personally I've seen the problem many times when updating extensions and those extensions brought version of MTP that was not compatible with my MSTest and no tests were discovered and nothing worked in IDE and there was no error. IMHO test framework + adapter should depend on each other and should dictate exact version of MTP. Running the tests is the important job here. Users should be able to use older version of the extension, and extensions should use the oldest version of MTP that fits them to avoid forcing new version of MTP that is incompatible with MSTest. In reality MSTest is shipped on the same cadence as MTP, so if 3rd party extensions get published, there should be already a version of MSTest that relies on the same versions as them. |
…r targets Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
I agree! @Youssef1313 Shall we go for a period with the strict restriction and see if people complain before moving to wider range for MSTest to MTP deps? |
|
It's risky IMO, but we can try. |
What risk are you thinking about? Happy to take that offline if you prefer. |
…ild.targets Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/testfx/sessions/12b79f7e-4515-4738-a805-696144730fd4
There was a problem hiding this comment.
Pull request overview
Enables Arcade’s NuGet repack tooling to rewrite inter-package dependencies to exact versions ([version]), ensuring Microsoft.Testing.Platform (MTP) extension packages and MSTest packages don’t float to newer platform versions that could break IVT-based internal access.
Changes:
- Set
UsingToolNuGetRepack=trueineng/Versions.propsto turn on exact-version dependency rewriting during packaging. - Added an inline comment referencing the upstream NuGet issue context.
MTP extension packages (TrxReport, CrashDump, Retry, etc.) currently declare
>= versiondependencies onMicrosoft.Testing.Platform. This is problematic with IVT usage — a newer platform version could be resolved at runtime, breaking internal member access.Setting
UsingToolNuGetRepack=trueineng/Versions.propsenables Arcade'sBuildReleasePackages.targets, which runsUpdatePackageVersionTaskwithExactVersions="true"post-pack. This rewrites all inter-package dependency versions to exact ([version]) for both MTP and MSTest packages.MTP packages (
Microsoft.Testing.*): Get exact version dependencies for inter-package references — critical for IVT safety.MSTest packages (
MSTest.*): Also get exact version dependencies, including on MTP packages. This ensures version compatibility and avoids issues where updating extensions could bring in an incompatible MTP version.PreReleaseVersionLabelis already set (required by the repack tool)Arcade SDK version includes
BuildReleasePackages.targetswithExactVersionssupportSee NuGet/Home#7213 for upstream context
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.