Skip to content

Commit e712bc7

Browse files
committed
Add the right PackageOverrides.txt entries and make sure we exclude analyzers from the expected PackageOverrides list (they aren't supposed to be there)
1 parent b84d04d commit e712bc7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.sfxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@
146146
'%(ReferencePath.NuGetPackageId)' != 'Microsoft.Internal.Runtime.AspNetCore.Transport' AND
147147
'%(ReferencePath.NuGetSourceType)' == 'Package' " />
148148

149+
<!--
150+
Use NETCore.App version for Runtime references.
151+
This is the same as above except in "stabilized" version builds, where the transport package version
152+
would be a non-shipping unstablized version, but the NETCore.App version is the shipping version.
153+
-->
154+
<_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(FileName)|$(MicrosoftNETCoreAppRuntimeVersion)')"
155+
Condition="'%(ReferencePath.NuGetPackageId)' == 'Microsoft.Internal.Runtime.AspNetCore.Transport' AND
156+
'%(ReferencePath.NuGetSourceType)' == 'Package' " />
157+
158+
<!-- Use shared framework version for project references. -->
149159
<_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(FileName)|$(ReferencePackSharedFxVersion)')"
150160
Condition=" '%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' " />
151161
</ItemGroup>

src/Framework/test/Microsoft.AspNetCore.App.UnitTests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,9 @@
9595
</MSBuild>
9696

9797
<ItemGroup>
98-
<_TargetingPackDependencies Include="@(_TargetingPackFiles->WithMetadataValue('Extension','.dll'))" />
98+
<_AnalyzersInTargetingPack Include="@(_TargetingPackFiles)" Condition="$([System.String]::new('%(_TargetingPackFiles.Directory)').Contains('analyzers'))" />
99+
<_AnalyzersInTargetingPack Include="@(_TargetingPackFiles->WithMetadataValue('OutputItemType','AspNetCoreAnalyzer'))" />
100+
<_TargetingPackDependencies Include="@(_TargetingPackFiles->WithMetadataValue('Extension','.dll'))" Exclude="@(_AnalyzersInTargetingPack)" />
99101

100102
<AssemblyAttribute Include="Microsoft.AspNetCore.TestData">
101103
<_Parameter1>TargetingPackDependencies</_Parameter1>

0 commit comments

Comments
 (0)