解决VS2022 Your project does not reference... Add a reference to ... property of your project file and then re-run NuGet restore.

代码换了台电脑,一直提示”

Microsoft Visual Studio\MSBuild\Microsoft\NuGet\17.0\Microsoft.NuGet.targets(198,5): error : Your project does not reference ".NETFramework,Version=v4.8" framework. Add a reference to ".NETFramework,Version=v4.8" in the "TargetFrameworks" property of your project file and then re-run NuGet restore.

“,,,不知原因。

 

解决:删除OBJ目录,重新编译,OK。

 

参考 : https://blog.csdn.net/jiushidt/article/details/128333808

posted @ 2025-05-30 12:46  sun51586  阅读(158)  评论(0)    收藏  举报