-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Using the nuget package version 1.0.8860, when targeting NET8 or NET9, the following warning is issued:
Package 'FluentSysInfo.Core 1.0.8860' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net8.0'. This package may not be fully compatible with your project.
To reproduce it just create a new console application targeting the aforementioned frameworks, add the FluentSysInfo.Core 1.0.8860 nuget package and do a build.
The confusing part is that the code works as expected despite the warning! It seems that the NET8/9 code is able to use the NET48 lib. Opening the FluentSysInfo.Core.dll in the output bin folder in ILSpy confirms that it is indeed the 4.8 version:
C:\work\simpax\Drafts\Telemetry\TelemetryBrainstorm\bin\Debug\net8.0\FluentSysInfo.Core.dll
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
The console app DLL in the same folder uses the expected runtime:
C:\work\simpax\Drafts\Telemetry\TelemetryBrainstorm\bin\Debug\net8.0\TelemetryBrainstorm.dll
[assembly: TargetFramework(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]
Here is my project file:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentSysInfo.Core" Version="1.0.8860" />
<PackageReference Include="Hardware.Info" Version="101.0.1.1" />
</ItemGroup>
</Project>