admin管理员组文章数量:1315792
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>
本文标签: cWhy does a warning icon appear over an installed nuget package iconStack Overflow
版权声明:本文标题:c# - Why does a warning icon appear over an installed nuget package icon? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741985315a2408640.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论