File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 166166 <!-- Use shared framework version for project references. -->
167167 <_AspNetCoreAppPackageOverrides Include="@(ReferencePath->'%(FileName)|$(ReferencePackSharedFxVersion)')"
168168 Condition=" '%(ReferencePath.ReferenceSourceTarget)' == 'ProjectReference' " />
169+
170+ <!-- Include Microsoft.AspNetCore.App for Package Pruning -->
171+ <_AspNetCoreAppPackageOverrides Include="$(SharedFrameworkName)|$(ReferencePackSharedFxVersion)" />
169172 </ItemGroup>
170173
171174 <WriteLinesToFile
Original file line number Diff line number Diff line change @@ -144,7 +144,8 @@ public void PackageOverridesContainsCorrectEntries()
144144 . Split ( ';' , StringSplitOptions . RemoveEmptyEntries )
145145 . ToHashSet ( ) ;
146146
147- Assert . Equal ( packageOverrideFileLines . Length , runtimeDependencies . Count + aspnetcoreDependencies . Count ) ;
147+ // PackageOverrides will contain all Aspnetcore/Runtime ref pack libs, plus an entry for Microsoft.AspNetCore.App
148+ Assert . Equal ( packageOverrideFileLines . Length , runtimeDependencies . Count + aspnetcoreDependencies . Count + 1 ) ;
148149
149150 // PackageOverrides versions should remain at Major.Minor.0 while servicing.
150151 var netCoreAppPackageVersion = TestData . GetMicrosoftNETCoreAppPackageVersion ( ) ;
@@ -177,7 +178,7 @@ public void PackageOverridesContainsCorrectEntries()
177178 {
178179 Assert . Equal ( netCoreAppPackageVersion , packageVersion ) ;
179180 }
180- else if ( aspnetcoreDependencies . Contains ( packageName ) )
181+ else if ( packageName . Equals ( "Microsoft.AspNetCore.App" , StringComparison . Ordinal ) || aspnetcoreDependencies . Contains ( packageName ) )
181182 {
182183 Assert . Equal ( aspNetCoreAppPackageVersion , packageVersion ) ;
183184 }
You can’t perform that action at this time.
0 commit comments