Support override of PackageOverrides.txt content in servicing (#26308)
* Support override of PackageOverrides.txt content in servicing - doing now ensures we don't forget if we need to service targeting packs - not needed in release/3.1 because that branch still pins packages at `X.Y.0` in targeting packs - did not dobfc1ec6792/ #25851 work in 3.1 because dotnet/runtime ref/ assemblies change there - revert no-longer-necessary parts of6418c8f78a/ #25986 - `$(MicrosoftNETCoreAppRuntimeVersion)` is now correct whenever `GeneratePackageOverrides` runs nits: - rename `GeneratePackageConflictManifest` target to `GeneratePackageOverrides` - rename `$(PackageConflictManifestFileName)` to `$(PackageOverridesFileName)`
This commit is contained in:
parent
2e7b294c6c
commit
eed71b9083
|
|
@ -35,8 +35,6 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
<!-- This project should not be referenced via the `<Reference>` implementation. -->
|
<!-- This project should not be referenced via the `<Reference>` implementation. -->
|
||||||
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
|
<IsProjectReferenceProvider>false</IsProjectReferenceProvider>
|
||||||
|
|
||||||
<PackageConflictManifestFileName>PackageOverrides.txt</PackageConflictManifestFileName>
|
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
We are ignoring MSB3243 warnings since implementation and reference assemblies are versioned differently.
|
We are ignoring MSB3243 warnings since implementation and reference assemblies are versioned differently.
|
||||||
We need both to compose the targeting pack with reference assemblies and xml docs.
|
We need both to compose the targeting pack with reference assemblies and xml docs.
|
||||||
|
|
@ -52,7 +50,12 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
<!-- Runtime extensions transport paths -->
|
<!-- Runtime extensions transport paths -->
|
||||||
<RuntimeExtensionsReferenceDirectory>$(PkgMicrosoft_Extensions_Internal_Transport)\ref\$(TargetFramework)\</RuntimeExtensionsReferenceDirectory>
|
<RuntimeExtensionsReferenceDirectory>$(PkgMicrosoft_Extensions_Internal_Transport)\ref\$(TargetFramework)\</RuntimeExtensionsReferenceDirectory>
|
||||||
|
|
||||||
<!-- Platform manifest override metadata. -->
|
<!-- Package overrides and platform manifest metadata. -->
|
||||||
|
<PackageOverridesFileName>PackageOverrides.txt</PackageOverridesFileName>
|
||||||
|
<!-- PackageOverrides.txt is written in GeneratePackageOverrides target unless servicing. -->
|
||||||
|
<ReferencePackageOverridesPath Condition="'$(IsServicingBuild)' != 'true'">$(TargetDir)$(PackageOverridesFileName)</ReferencePackageOverridesPath>
|
||||||
|
<ReferencePackageOverridesPath Condition="'$(IsServicingBuild)' == 'true'">$(RepoRoot)eng\$(PackageOverridesFileName)</ReferencePackageOverridesPath>
|
||||||
|
<!-- PlatformManifest.txt is written in App.Runtime's GenerateSharedFxDepsFile target but not used here when servicing. -->
|
||||||
<ReferencePlatformManifestPath Condition="'$(IsServicingBuild)' != 'true'">$(PlatformManifestOutputPath)</ReferencePlatformManifestPath>
|
<ReferencePlatformManifestPath Condition="'$(IsServicingBuild)' != 'true'">$(PlatformManifestOutputPath)</ReferencePlatformManifestPath>
|
||||||
<ReferencePlatformManifestPath Condition="'$(IsServicingBuild)' == 'true'">$(RepoRoot)eng\PlatformManifest.txt</ReferencePlatformManifestPath>
|
<ReferencePlatformManifestPath Condition="'$(IsServicingBuild)' == 'true'">$(RepoRoot)eng\PlatformManifest.txt</ReferencePlatformManifestPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
@ -84,7 +87,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
<BuildDependsOn Condition="'$(IsTargetingPackBuilding)' != 'false'">
|
<BuildDependsOn Condition="'$(IsTargetingPackBuilding)' != 'false'">
|
||||||
$(BuildDependsOn);
|
$(BuildDependsOn);
|
||||||
_ResolveTargetingPackContent;
|
_ResolveTargetingPackContent;
|
||||||
GeneratePackageConflictManifest;
|
GeneratePackageOverrides;
|
||||||
IncludeFrameworkListFile;
|
IncludeFrameworkListFile;
|
||||||
_BatchCopyToLayoutTargetDir;
|
_BatchCopyToLayoutTargetDir;
|
||||||
_InstallTargetingPackIntoLocalDotNet;
|
_InstallTargetingPackIntoLocalDotNet;
|
||||||
|
|
@ -144,26 +147,22 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
Condition="Exists('%(RootDir)%(Directory)%(FileName).xml')" />
|
Condition="Exists('%(RootDir)%(Directory)%(FileName).xml')" />
|
||||||
<AspNetCoreReferenceDocXml Include="@(_SelectedExtensionsRefAssemblies->'$(RuntimeExtensionsReferenceDirectory)%(FileName).xml')" />
|
<AspNetCoreReferenceDocXml Include="@(_SelectedExtensionsRefAssemblies->'$(RuntimeExtensionsReferenceDirectory)%(FileName).xml')" />
|
||||||
<!-- Grab remaining .xml files from packages -->
|
<!-- Grab remaining .xml files from packages -->
|
||||||
<AspNetCoreReferenceDocXml
|
<AspNetCoreReferenceDocXml
|
||||||
Include="@(AspNetCoreReferenceAssemblyPath->WithMetadataValue('ExternallyResolved', 'true')->'%(RootDir)%(Directory)%(Filename).xml')"
|
Include="@(AspNetCoreReferenceAssemblyPath->WithMetadataValue('ExternallyResolved', 'true')->'%(RootDir)%(Directory)%(Filename).xml')"
|
||||||
Condition="Exists('%(RootDir)%(Directory)%(Filename).xml')" />
|
Condition="Exists('%(RootDir)%(Directory)%(Filename).xml')" />
|
||||||
|
|
||||||
<RefPackContent Include="@(AspNetCoreReferenceAssemblyPath)" PackagePath="$(RefAssemblyPackagePath)" />
|
<RefPackContent Include="@(AspNetCoreReferenceAssemblyPath)" PackagePath="$(RefAssemblyPackagePath)" />
|
||||||
<RefPackContent Include="@(AspNetCoreReferenceDocXml)" PackagePath="$(RefAssemblyPackagePath)" />
|
<RefPackContent Include="@(AspNetCoreReferenceDocXml)" PackagePath="$(RefAssemblyPackagePath)" />
|
||||||
<RefPackContent Include="$(TargetDir)$(PackageConflictManifestFileName)" PackagePath="$(ManifestsPackagePath)" />
|
<RefPackContent Include="$(ReferencePackageOverridesPath)" PackagePath="$(ManifestsPackagePath)" />
|
||||||
<RefPackContent Include="$(ReferencePlatformManifestPath)" PackagePath="$(ManifestsPackagePath)" />
|
<RefPackContent Include="$(ReferencePlatformManifestPath)" PackagePath="$(ManifestsPackagePath)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<Target Name="GeneratePackageConflictManifest"
|
<Target Name="GeneratePackageOverrides"
|
||||||
|
Condition=" '$(IsServicingBuild)' != 'true' "
|
||||||
DependsOnTargets="_ResolveTargetingPackContent"
|
DependsOnTargets="_ResolveTargetingPackContent"
|
||||||
Inputs="$(MSBuildAllProjects)"
|
Inputs="$(MSBuildAllProjects)"
|
||||||
Outputs="$(TargetDir)$(PackageConflictManifestFileName)">
|
Outputs="$(ReferencePackageOverridesPath">
|
||||||
<PropertyGroup>
|
|
||||||
<_PinnedNETCoreAppRuntimeVersion>$(MicrosoftNETCoreAppRuntimeVersion)</_PinnedNETCoreAppRuntimeVersion>
|
|
||||||
<_PinnedNETCoreAppRuntimeVersion
|
|
||||||
Condition=" '$(IsServicingBuild)' == 'true' ">$(_PinnedNETCoreAppRuntimeVersion.Split('.')[0]).$(_PinnedNETCoreAppRuntimeVersion.Split('.')[1]).0</_PinnedNETCoreAppRuntimeVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<!-- Use package version for non-Extensions references. -->
|
<!-- Use package version for non-Extensions references. -->
|
||||||
<_AspNetCoreAppPackageOverrides Include="@(AspNetCoreReferenceAssemblyPath->'%(NuGetPackageId)|%(NuGetPackageVersion)')"
|
<_AspNetCoreAppPackageOverrides Include="@(AspNetCoreReferenceAssemblyPath->'%(NuGetPackageId)|%(NuGetPackageVersion)')"
|
||||||
|
|
@ -172,8 +171,8 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
'%(AspNetCoreReferenceAssemblyPath.NuGetPackageId)' != 'Microsoft.Extensions.Internal.Transport' AND
|
'%(AspNetCoreReferenceAssemblyPath.NuGetPackageId)' != 'Microsoft.Extensions.Internal.Transport' AND
|
||||||
'%(AspNetCoreReferenceAssemblyPath.NuGetSourceType)' == 'Package' " />
|
'%(AspNetCoreReferenceAssemblyPath.NuGetSourceType)' == 'Package' " />
|
||||||
|
|
||||||
<!-- Use pinned NETCore.App version for Extensions references. -->
|
<!-- Use NETCore.App.Runtime version for Extensions references. -->
|
||||||
<_AspNetCoreAppPackageOverrides Include="@(_SelectedExtensionsRefAssemblies->'%(FileName)|$(_PinnedNETCoreAppRuntimeVersion)')" />
|
<_AspNetCoreAppPackageOverrides Include="@(_SelectedExtensionsRefAssemblies->'%(FileName)|$(MicrosoftNETCoreAppRuntimeVersion)')" />
|
||||||
|
|
||||||
<_AspNetCoreAppPackageOverrides Include="@(AspNetCoreReferenceAssemblyPath->'%(FileName)|$(ReferencePackSharedFxVersion)')"
|
<_AspNetCoreAppPackageOverrides Include="@(AspNetCoreReferenceAssemblyPath->'%(FileName)|$(ReferencePackSharedFxVersion)')"
|
||||||
Condition=" '%(AspNetCoreReferenceAssemblyPath.ReferenceSourceTarget)' == 'ProjectReference' " />
|
Condition=" '%(AspNetCoreReferenceAssemblyPath.ReferenceSourceTarget)' == 'ProjectReference' " />
|
||||||
|
|
@ -181,7 +180,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
|
||||||
|
|
||||||
<WriteLinesToFile
|
<WriteLinesToFile
|
||||||
Lines="@(_AspNetCoreAppPackageOverrides)"
|
Lines="@(_AspNetCoreAppPackageOverrides)"
|
||||||
File="$(TargetDir)$(PackageConflictManifestFileName)"
|
File="$(ReferencePackageOverridesPath)"
|
||||||
Overwrite="true" />
|
Overwrite="true" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue