Skip to content

Commit ceebdc4

Browse files
authored
Condition NuGet pack in Microsoft.Net.Sdk on framework only (#50902)
1 parent a1473ad commit ceebdc4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@
5555
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
5656
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
5757
<PackageReference Include="Microsoft.NET.HostModel" />
58-
<PackageReference Include="NuGet.Commands" />
59-
<PackageReference Include="NuGet.Build.Tasks.Pack" />
58+
<PackageReference Include="NuGet.ProjectModel" />
59+
<PackageReference Include="NuGet.Commands" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
60+
<PackageReference Include="NuGet.Build.Tasks.Pack" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />
6061
<PackageReference Include="Microsoft.Deployment.DotNet.Releases" />
6162
<!-- Use an alias for APICompat so that we bring in the binaries, but don't accidentally reference any types -->
6263
<ProjectReference Include="$(RepoRoot)src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Task\Microsoft.DotNet.ApiCompat.Task.csproj" Aliases="unused" PrivateAssets="All" />

0 commit comments

Comments
 (0)