Skip to content

Commit

Permalink
Change the version of System.Management in DeviceId.Windows.Wmi
Browse files Browse the repository at this point in the history
The netstandard2.0 target framework covers .net core 3.1 and .net 5.0, and System.Management 7.0 doesn't support these frameworks, which is why it makes sense to use version 6.0 for this target as the one that is supported by all its comaptible target frameworks.
  • Loading branch information
Artem Koloskov authored and MatthewKing committed Sep 19, 2023
1 parent 1ea1754 commit 14c10f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DeviceId.Windows.Wmi/DeviceId.Windows.Wmi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
<Reference Include="System.Management" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net5.0' ">
<PackageReference Include="System.Management" Version="6.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' or '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0' or '$(TargetFramework)' == 'net7.0' ">
<PackageReference Include="System.Management" Version="7.0.0" />
</ItemGroup>

Expand Down

0 comments on commit 14c10f5

Please sign in to comment.