Skip to content

Commit c2c21fd

Browse files
authored
React to NuGet package pruning warnings (#11496)
Contributes to dotnet/sdk#46829 NuGet added a new feature that automatically prunes package and project references that are provided by the shared framework that is targeted. Resolve the one warning that got emitted when building the repository in non-source-only mode.
1 parent 8157c5f commit c2c21fd

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: src/Compiler/test/Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X/Microsoft.AspNetCore.Razor.Test.MvcShim.Version1_X.Compiler.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
</PropertyGroup>
77

8-
<ItemGroup>
8+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
99
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
1010
<PackageReference Include="System.Text.Encodings.Web" />
1111
</ItemGroup>

Diff for: src/Compiler/test/Microsoft.AspNetCore.Razor.Test.MvcShim.Version2_X/Microsoft.AspNetCore.Razor.Test.MvcShim.Version2_X.Compiler.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<PreserveCompilationContext>true</PreserveCompilationContext>
66
</PropertyGroup>
77

8-
<ItemGroup>
8+
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
99
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
1010
<PackageReference Include="System.Text.Encodings.Web" />
1111
</ItemGroup>

Diff for: src/Razor/src/Microsoft.AspNetCore.Razor.ProjectEngineHost/Microsoft.AspNetCore.Razor.ProjectEngineHost.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
1717
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" />
1818
<PackageReference Include="MessagePack" />
19-
<PackageReference Include="System.Threading.Tasks.Extensions" />
19+
<PackageReference Include="System.Threading.Tasks.Extensions" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
2020
<PackageReference Include="Microsoft.VisualStudio.Threading" />
2121
</ItemGroup>
2222

Diff for: src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Microsoft.AspNetCore.Razor.Test.Common.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<ItemGroup>
1111
<ProjectReference Include="..\..\Compiler\Microsoft.CodeAnalysis.Razor.Compiler\src\Microsoft.CodeAnalysis.Razor.Compiler.csproj" />
12-
<PackageReference Include="Microsoft.CSharp" />
12+
<PackageReference Include="Microsoft.CSharp" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
1313
<PackageReference Include="Microsoft.CodeAnalysis.Common" />
1414
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
1515
<PackageReference Include="Microsoft.CodeAnalysis.Test.Utilities" />

0 commit comments

Comments
 (0)