英文:
Visual Studio Reports an Error After Pulling the Project
问题
在我重新安装系统后,在 Windows 10 上重新安装 Visual Studio 2022 并从 GitHub 上拉取项目时,出现了以下错误:
包 Microsoft.EntityFrameworkCore.Analyzers 的版本 2.2.6 未找到。可能在 NuGet 恢复后已被删除。否则,NuGet 恢复可能仅部分完成,这可能是由于最大路径长度限制引起的。
我已经下载了 2.2 SDK 文件并进行了安装,但仍然不起作用。
英文:
After I reinstalled Visual Studio 2022 on Windows 10 after reinstalling the system, and pulled the project on github, but such an error occurred
Package Microsoft.EntityFrameworkCore.Analyzers with version 2.2.6 was not found. It may have been removed after a NuGet restore. Otherwise, the NuGet restore may only be partially completed, which may be due to the maximum path length limit
I downloaded the 2.2 SDK file and installed it, but it still doesn't work
答案1
得分: 1
-
根据错误 NETSDK1064 包 Microsoft.EntityFrameworkCore.Analyzers,版本 3.1.2 未找到。可能已在 NuGet 恢复后被删除。否则,NuGet 恢复可能只部分完成,这可能是由于最大路径长度限制所致。。这可能是因为您在重新安装系统后没有使用管理员帐户,您自己的帐户没有项目目录的写入权限。
-
如果上述方法仍然不起作用,请参考环境变量的问题。
请在 cmd 中执行 "dotnet --info",请记住基本路径。
然后使用此路径检查您的 SDK 2.2 是否位于此路径下。例如,我的是 C:\Program Files\dotnet\sdk\2.2。
英文:
-
According to Error NETSDK1064 Package Microsoft.EntityFrameworkCore.Analyzers, version 3.1.2 was not found. It might have been deleted since NuGet restore. Otherwise, NuGet restore might have only partially completed, which might have been due to maximum path length restr actions .. It should be because you did not use the administrator account after reinstalling the system, and your own account does not have write access to the project directory.
-
If the above method still does not work, please refer to the problem with the environment variable.
Please execute "dotnet --info" in cmd, please remember the base path.
Then use this path to check whether your SDK 2.2 is under this path. For example, mine is C:\Program Files\dotnet\sdk\2.2
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论