Explicitly map `@(Reference)` to `@(PackageReference)` for Microsoft.Internal.Extensions.Refs

This commit is contained in:
Doug Bunting 2020-02-20 10:59:17 -08:00
parent f1fbb2d757
commit e27f912453
No known key found for this signature in database
GPG Key ID: EE41520987982C03
2 changed files with 18 additions and 1 deletions

View File

@ -210,6 +210,24 @@
Text="Could not resolve this reference. Could not locate the package or project for "%(Reference.Identity)". Did you update baselines and dependencies lists? See docs/ReferenceResolution.md for more details." />
</Target>
<PropertyGroup>
<_CompileTfmUsingReferenceAssemblies>false</_CompileTfmUsingReferenceAssemblies>
<_CompileTfmUsingReferenceAssemblies
Condition=" '$(CompileUsingReferenceAssemblies)' != false AND '$(TargetFramework)' == '$(DefaultNetCoreTargetFramework)' ">true</_CompileTfmUsingReferenceAssemblies>
</PropertyGroup>
<!--
If we have a ref/ assembly from Extensions for a package, use that when compiling. The build-only reference to
Microsoft.Internal.Extensions.Refs ensures package is installed and $(MicrosoftInternalExtensionsRefsPath) is set.
-->
<ItemGroup
Condition=" $(_CompileTfmUsingReferenceAssemblies) OR ('$(IsTargetingPackBuilding)' != 'false' AND '$(MSBuildProjectName)' == 'Microsoft.AspNetCore.App.Ref') ">
<PackageReference Include="Microsoft.Internal.Extensions.Refs"
Version="$(MicrosoftInternalExtensionsRefsPackageVersion)"
IsImplicitlyDefined="true"
IncludeAssets="Build"
PrivateAssets="All" />
</ItemGroup>
<!-- These targets are used to generate the map of assembly name to project files. See also the /t:GenerateProjectList target in build/repo.targets. -->
<Target Name="GetReferencesProvided" Returns="@(ProvidesReference)">
<ItemGroup>

View File

@ -59,7 +59,6 @@ This package is an internal implementation of the .NET Core SDK and is not meant
<ItemGroup>
<!-- Note: do not add _TransitiveExternalAspNetCoreAppReference to this list. This is intentionally not listed as a direct package reference. -->
<Reference Include="@(AspNetCoreAppReference);@(AspNetCoreAppReferenceAndPackage);@(ExternalAspNetCoreAppReference)" />
<Reference Include="Microsoft.Internal.Extensions.Refs" Version="$(MicrosoftInternalExtensionsRefsPackageVersion)" IncludeAssets="Build" />
<!-- Enforce build order. Targeting pack needs to bundle information about the runtime. -->
<ProjectReference Include="..\src\Microsoft.AspNetCore.App.Runtime.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>