As you can see, the MCData package has a warning icon. The project MCSecure compiles fine for both net48 and net8.0-windows. So I checked the Messages output and the only issue I can relate to a possible cause for the icon is:
Package 'MCData 25.1.30' 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-windows7.0'. This package may not be fully compatible with your project.
The MCData nuspec file quotes the TargetFrameWork as follows:
target="lib\net8.0-windows10.1\MCData.v25.1.30.dll"
I don't believe you can add a target framework version number in the MCSecure.csproj file so how does the complier come up with a Windows verion of 7.0 as causing the issue.
The above may or may not be the cause for the warning icon but I think it's a fair bet that it is.
As you can see, the MCData package has a warning icon. The project MCSecure compiles fine for both net48 and net8.0-windows. So I checked the Messages output and the only issue I can relate to a possible cause for the icon is:
Package 'MCData 25.1.30' 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-windows7.0'. This package may not be fully compatible with your project.
The MCData nuspec file quotes the TargetFrameWork as follows:
target="lib\net8.0-windows10.1\MCData.v25.1.30.dll"
I don't believe you can add a target framework version number in the MCSecure.csproj file so how does the complier come up with a Windows verion of 7.0 as causing the issue.
The above may or may not be the cause for the warning icon but I think it's a fair bet that it is.
Share Improve this question asked Jan 30 at 4:59 DavidDavid 1,0582 gold badges13 silver badges31 bronze badges2 Answers
Reset to default 1Not only can you include target framework values in the .csproj file, if you don't you get the warning described above. Adding the version number removed the warning and the icon...
<TargetFrameworks>net48;net8.0-windows10.0.17763</TargetFrameworks>
If your project simply targets net8.0-windows, it may default to windows7.0 (the minimum supported version in .NET 8.0), causing the mismatch.
Modify MCSecure.csproj to add the full targetframework.
<TargetFramework>net8.0-windows10.1</TargetFramework>