Skip to content

Commit 0abb809

Browse files
committed
Seperate different dependencies for different target frameworks. This solves a non issue but should resolve the warnings that occurred during build
1 parent 43f05c3 commit 0abb809

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/NuGetUtility/NuGetUtility.csproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
@@ -25,11 +25,19 @@
2525

2626
<ItemGroup>
2727
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.0.2" />
28-
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" Version="17.4.0" />
2928
<PackageReference Include="Microsoft.Build.Locator" Version="1.4.1" />
3029
<PackageReference Include="NuGet.Commands" Version="6.4.0" />
3130
<PackageReference Include="NuGet.Packaging" Version="6.4.0" />
3231
</ItemGroup>
32+
33+
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
34+
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" Version="17.3.2" />
35+
</ItemGroup>
36+
37+
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
38+
<PackageReference Include="Microsoft.Build" ExcludeAssets="runtime" Version="17.4.0" />
39+
</ItemGroup>
40+
3341
<ItemGroup>
3442
<Content Include="..\..\README.md">
3543
<Pack>true</Pack>

0 commit comments

Comments
 (0)