diff --git a/eng/targets/ResolveReferences.targets b/eng/targets/ResolveReferences.targets index df5b0eaa86..197491fd5a 100644 --- a/eng/targets/ResolveReferences.targets +++ b/eng/targets/ResolveReferences.targets @@ -10,11 +10,12 @@ Items used by the resolution strategy: - * BaselinePackageReference = a list of packages that were reference in the last release of the project currently building + * BaselinePackageReference = a list of packages that were referenced in the last release of the project currently building + - mainly used to ensure references do not change in servicing builds unless $(UseLatestPackageReferences) is not true. * LatestPackageReference = a list of the latest versions of packages * Reference = a list of the references which are needed for compilation or runtime * ProjectReferenceProvider = a list which maps of assembly names to the project file that produces it - --> +--> @@ -29,36 +30,29 @@ true true + Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsPackableInNonServicingBuild)' != 'true' ">true true - false + Condition=" '$(UseLatestPackageReferences)' == '' AND '$(IsPackageInThisPatch)' == 'true' ">true + false - - true - true - false + + true - + @@ -73,20 +67,21 @@ <_AllowedExplicitPackageReference Include="@(PackageReference->WithMetadataValue('AllowExplicitReference', 'true'))" /> <_AllowedExplicitPackageReference Include="FSharp.Core" Condition="'$(MSBuildProjectExtension)' == '.fsproj'" /> - <_ExplicitPackageReference Include="@(PackageReference)" Exclude="@(_ImplicitPackageReference);@(_AllowedExplicitPackageReference)" /> + <_ExplicitPackageReference Include="@(PackageReference)" + Exclude="@(_ImplicitPackageReference);@(_AllowedExplicitPackageReference)" /> - <_CompilationOnlyReference Condition="'$(TargetFramework)' == 'netstandard2.0'" - Include="@(Reference->WithMetadataValue('NuGetPackageId','NETStandard.Library'))" /> + <_CompilationOnlyReference Include="@(Reference->WithMetadataValue('NuGetPackageId','NETStandard.Library'))" + Condition="'$(TargetFramework)' == 'netstandard2.0'" /> <_InvalidReferenceToNonSharedFxAssembly Condition="'$(IsAspNetCoreApp)' == 'true'" - Include="@(Reference)" - Exclude=" - @(AspNetCoreAppReference); - @(AspNetCoreAppReferenceAndPackage); - @(ExternalAspNetCoreAppReference); - @(_CompilationOnlyReference); - @(Reference->WithMetadataValue('IsSharedSource', 'true')); - @(Reference->WithMetadataValue('PrivateAssets', 'All'))" /> + Include="@(Reference)" + Exclude=" + @(AspNetCoreAppReference); + @(AspNetCoreAppReferenceAndPackage); + @(ExternalAspNetCoreAppReference); + @(_CompilationOnlyReference); + @(Reference->WithMetadataValue('IsSharedSource', 'true')); + @(Reference->WithMetadataValue('PrivateAssets', 'All'))" /> <_OriginalReferences Include="@(Reference)" /> @@ -134,7 +129,7 @@ @@ -309,9 +304,12 @@ - <_CustomCollectProjectReferenceDependsOn Condition="'$(TargetFramework)' != ''">ResolveProjectReferences + <_CustomCollectProjectReferenceDependsOn + Condition="'$(TargetFramework)' != ''">ResolveProjectReferences - + <_TargetFrameworks Include="$(TargetFrameworks)" />