-
Notifications
You must be signed in to change notification settings - Fork 288
Simplify MTP packaging #6831
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
Simplify MTP packaging #6831
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the NuGet package layout structure for Microsoft.Testing.Platform and its extensions by simplifying build file organization and eliminating target framework-specific packaging. The changes consolidate build configurations from a multi-targeting approach to a simpler, unified structure.
Key changes:
- Consolidate build file imports to reference
buildfolders instead ofbuildMultiTargeting - Replace
TfmSpecificPackageFilewith simplifiedNoneitems in project files - Move configuration from
buildMultiTargetingfolders intobuildfolders for extension packages - Simplify MSBuild path references by removing one level of directory traversal
Reviewed Changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Microsoft.Testing.Platform.targets (buildTransitive & build) | Updated import paths to reference buildMultiTargeting with one less parent directory level |
| Microsoft.Testing.Platform.props (buildTransitive & build) | Updated import paths to reference buildMultiTargeting with one less parent directory level |
| Microsoft.Testing.Platform.csproj | Simplified package file inclusion from Content/TfmSpecificPackageFile to None items |
| Microsoft.Testing.Extensions.*.props (buildTransitive) | Changed imports from buildMultiTargeting to build folder |
| Microsoft.Testing.Extensions.*.props (buildMultiTargeting) | Deleted files - configuration moved to build folder |
| Microsoft.Testing.Extensions.*.props (build) | Moved configuration content from buildMultiTargeting to build folder |
| Microsoft.Testing.Extensions.*.csproj | Simplified package file inclusion and removed buildMultiTargeting references |
...latform/Microsoft.Testing.Extensions.HotReload/Microsoft.Testing.Extensions.HotReload.csproj
Show resolved
Hide resolved
This part is not implemented or am I blind? I see no changes touching tfm specific files. also if we don't have tfm specific folders ,it will make restore the package for any tfm. Or maybe I am misunderstanding the sentence. |
| <TfmSpecificPackageFile Include="buildTransitive/**"> | ||
| <PackagePath>buildTransitive/$(TargetFramework)</PackagePath> | ||
| </TfmSpecificPackageFile> | ||
| <TfmSpecificPackageFile Include="build/**"> | ||
| <PackagePath>build/$(TargetFramework)</PackagePath> | ||
| </TfmSpecificPackageFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nohwnd Here we were packing per-TFM. The updated logic doesn't.
Hmm, I thought it would fail if no compatible TFM is found in lib. Also note that for all modified packages, we target |
|
hmm then I don't think there is a good solution. I am not 100% sure without trying (since it is an "edge-case"), but imho this will make the package restore for everything, we had this problem with one of vstest packages. Secondly the netstandard2.0 compatibility is unfortunate, but you can do this what system.io.hashing does (dotnet/runtime does that via some custom target generator) . https://nuget.info/packages/System.IO.Hashing/10.0.0-rc.2.25502.107 <Project InitialTargets="NETStandardCompatError_System_IO_Hashing_net8_0">
<Target Name="NETStandardCompatError_System_IO_Hashing_net8_0"
Condition="'$(SuppressTfmSupportBuildWarnings)' == ''">
<Warning Text="System.IO.Hashing 10.0.0-rc.2.25502.107 doesn't support $(TargetFramework) and has not been tested with it. Consider upgrading your TargetFramework to net8.0 or later. You may also set <SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> in the project file to ignore this warning and attempt to run in this unsupported configuration at your own risk." />
</Target>
</Project>they do that in buildTransitive/netstandard2.0 target. I am not sure if we can combine this with actually supporting netstandard2.0 (unless we want to add netcore1.0 to tfms :D) |
|
Closing for now. Not worth spending time on this for now. We can revisit later. |


buildMultitargetingbecausebuildMultitargetingis only relevant for the "outer" build. TestingPlatformBuilderHook is only relevant for the inner builds.