File tree Expand file tree Collapse file tree 5 files changed +26
-15
lines changed
Microsoft.NET.Build.Tasks Expand file tree Collapse file tree 5 files changed +26
-15
lines changed Original file line number Diff line number Diff line change 1+ <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
2+ <Project >
3+
4+ <!--
5+ This file contains common package references for MSBuild task assemblies that ship in the SDK.
6+
7+ These packages use VersionOverride to ensure compatibility with MSBuild's binding redirects.
8+ Microsoft.NET.HostModel and other components also use these dependencies, so we need to ensure
9+ that all components can load the same assembly versions.
10+
11+ See MSBuild binding redirect configuration:
12+ https://github.com/dotnet/msbuild/blob/main/src/MSBuild/app.config
13+ -->
14+
15+ <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
16+ <PackageReference Include =" System.Collections.Immutable" VersionOverride =" $(SystemCollectionsImmutableToolsetPackageVersion)" />
17+ <PackageReference Include =" System.Reflection.Metadata" VersionOverride =" $(SystemReflectionMetadataToolsetPackageVersion)" />
18+ <PackageReference Include =" System.Reflection.MetadataLoadContext" VersionOverride =" $(SystemReflectionMetadataLoadContextToolsetPackageVersion)" />
19+ </ItemGroup >
20+
21+ </Project >
Original file line number Diff line number Diff line change 1010 </PropertyGroup >
1111
1212 <Import Project =" Sdk.props" Sdk =" Microsoft.NET.Sdk" />
13+ <Import Project =" $(RepositoryEngineeringDir)SDKDeliveredMSBuildTask.props" />
1314
1415 <PropertyGroup >
1516 <OutputType >Library</OutputType >
4546 </ItemGroup >
4647
4748 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
48- <PackageReference Include =" System.Reflection.Metadata" VersionOverride =" $(SystemReflectionMetadataToolsetPackageVersion)" />
4949 <PackageReference Include =" System.Text.Json" VersionOverride =" $(SystemTextJsonToolsetPackageVersion)" />
5050 </ItemGroup >
5151
Original file line number Diff line number Diff line change 1111 </PropertyGroup >
1212
1313 <Import Project =" Sdk.props" Sdk =" Microsoft.NET.Sdk" />
14+ <Import Project =" $(RepositoryEngineeringDir)SDKDeliveredMSBuildTask.props" />
1415
1516 <PropertyGroup >
1617 <TargetFrameworks >$(SdkTargetFramework);net472</TargetFrameworks >
4748 </ItemGroup >
4849
4950 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
50- <PackageReference Include =" System.Reflection.Metadata" VersionOverride =" $(SystemReflectionMetadataToolsetPackageVersion)" />
5151 <PackageReference Include =" System.Text.Json" VersionOverride =" $(SystemTextJsonToolsetPackageVersion)" />
5252 <PackageReference Include =" System.Diagnostics.DiagnosticSource" VersionOverride =" $(SystemDiagnosticsDiagnosticSourceToolsetPackageVersion)" />
5353 </ItemGroup >
Original file line number Diff line number Diff line change 77 </PropertyGroup >
88
99 <Import Project =" Sdk.props" Sdk =" Microsoft.NET.Sdk" />
10+ <Import Project =" $(RepositoryEngineeringDir)SDKDeliveredMSBuildTask.props" />
1011
1112 <PropertyGroup >
1213 <Description >The MSBuild targets and properties for building .NET Core projects.</Description >
7374 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
7475 <PackageReference Include =" System.Text.Json" />
7576 <PackageReference Include =" Microsoft.Bcl.AsyncInterfaces" />
76-
77- <!--
78- Microsoft.NET.HostModel also uses System.Reflection.Metadata. Don't move ahead of the version of System.Reflection.Metadata
79- that MSBuild supports with the binding redirect to ensure that both this project and Microsoft.NET.HostModel can load
80- the same System.Reflection.Metadata assembly and their types can unify. See the following link for the MSBuild binding redirect config.
81- https://github.com/dotnet/msbuild/blob/299e0514835a1588e6ef21b1da748462dec706b8/src/MSBuild/app.config#L60
82- -->
83- <PackageReference Include =" System.Collections.Immutable" VersionOverride =" $(SystemCollectionsImmutableToolsetPackageVersion)" />
84- <PackageReference Include =" System.Reflection.Metadata" VersionOverride =" $(SystemReflectionMetadataToolsetPackageVersion)" />
85- <PackageReference Include =" System.Reflection.MetadataLoadContext" VersionOverride =" $(SystemReflectionMetadataLoadContextToolsetPackageVersion)" />
8677 </ItemGroup >
8778
8879 <!-- These are loaded from the CLI's copy on .NET Core, we don't need to duplicate them on disk -->
Original file line number Diff line number Diff line change 66 <AllowUnsafeBlocks >true</AllowUnsafeBlocks >
77 </PropertyGroup >
88
9+ <Import Project =" $(RepositoryEngineeringDir)SDKDeliveredMSBuildTask.props" />
10+
911 <ItemGroup >
1012 <Compile Include =" $(RepoRoot)\src\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\SdkFeatureBand.cs" LinkBase =" Common" />
1113 <Compile Include =" $(RepoRoot)src\Common\WorkloadSetVersion.cs" LinkBase =" Common" />
2224 </ItemGroup >
2325
2426 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
25- <PackageReference Include =" System.Collections.Immutable" VersionOverride =" $(SystemCollectionsImmutableToolsetPackageVersion)" />
26- <PackageReference Include =" System.Reflection.Metadata" VersionOverride =" $(SystemReflectionMetadataToolsetPackageVersion)" />
27- <PackageReference Include =" System.Reflection.MetadataLoadContext" VersionOverride =" $(SystemReflectionMetadataLoadContextToolsetPackageVersion)" />
2827 <PackageReference Include =" System.Resources.Extensions" VersionOverride =" $(SystemResourcesExtensionsToolsetPackageVersion)" />
2928 <Reference Include =" System.Net.Http" />
3029 </ItemGroup >
You can’t perform that action at this time.
0 commit comments