-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Extract common PackageReferences for MSBuild tasks that ship in the SDK #51445
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
base: release/10.0.2xx
Are you sure you want to change the base?
Extract common PackageReferences for MSBuild tasks that ship in the SDK #51445
Conversation
…SBuildTask.props Co-authored-by: rainersigwald <[email protected]>
|
|
||
| <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'"> | ||
| <PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataToolsetPackageVersion)" /> | ||
| <PackageReference Include="System.Text.Json" VersionOverride="$(SystemTextJsonToolsetPackageVersion)" /> |
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.
@copilot include these and any other *ToolsetPackageVersion reference in the new .props file.
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.
Done in f4d9a77. Added System.Text.Json, System.Diagnostics.DiagnosticSource, and System.Resources.Extensions to the shared props file and removed them from the individual project files.
…ask.props Co-authored-by: rainersigwald <[email protected]>
src/Tasks/sdk-tasks/sdk-tasks.csproj
Outdated
| <PackageReference Include="Microsoft.Build" /> | ||
| <PackageReference Include="Microsoft.Build.Tasks.Core" /> | ||
| <PackageReference Include="Microsoft.Build.Utilities.Core" /> |
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.
@copilot In these MSBuild-task projects, also pull out the unconditioned references to the packages
Microsoft.BuildMicrosoft.Build.FrameworkMicrosoft.Build.Tasks.CoreMicrosoft.Build.Utilities.Core
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.
Done in 9c9db97. Added Microsoft.Build.Framework and Microsoft.Build.Utilities.Core to the shared props file and removed them from all four MSBuild task projects. Also removed the duplicate System.Text.Json reference from Microsoft.NET.Build.Tasks.csproj that was conflicting with the toolset version from the shared props.
Co-authored-by: rainersigwald <[email protected]>
Extract common packagereferences for MSBuild tasks that ship in the SDK
This PR addresses issue #44768 by extracting common PackageReference declarations from MSBuild task projects into a shared
eng/SDKDeliveredMSBuildTask.propsfile.Changes Made
Created a new
eng/SDKDeliveredMSBuildTask.propsfile that contains common package references for all MSBuild task assemblies that ship in the SDK, and updated the following projects to import it:The shared props file now includes:
Common MSBuild packages (unconditioned):
Toolset packages (for .NETFramework only):
These packages use
VersionOverrideto ensure compatibility with MSBuild's binding redirects, preventing version conflicts and ensuring that all MSBuild task assemblies use consistent dependency versions.Benefits
Testing
Fixes #51444
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.