Skip to content

Commit 41fb213

Browse files
authored
React to NuGet package pruning warnings
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 41fb213

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
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>

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

Lines changed: 1 addition & 1 deletion
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>

src/Razor/src/Microsoft.AspNetCore.Razor.ProjectEngineHost/Microsoft.AspNetCore.Razor.ProjectEngineHost.csproj

Lines changed: 1 addition & 1 deletion
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

src/Shared/Microsoft.AspNetCore.Razor.Test.Common/Microsoft.AspNetCore.Razor.Test.Common.csproj

Lines changed: 1 addition & 1 deletion
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)