【发布时间】:2018-08-26 05:04:21
【问题描述】:
这是一个简单的错误,但令人沮丧?我的项目不会重建/编译。错误是:
Severity Code Description Project File Line Suppression State
Error This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is .\packages\Microsoft.Net.Compilers.1.2.1\build\Microsoft.Net.Compilers.props. Microsoft.Bot.Sample.LuisBot C:\Users\jmatson\Downloads\retail-info-bot-src\Microsoft.Bot.Sample.LuisBot.csproj 229
所以我尝试了一个 nuget restore 并得到:
All packages are already installed and there is nothing to restore. Time Elapsed: 00:00:00.0455939
========== Finished ==========
那么谁是对的,谁是错的,这又是如何解决的呢? :/
【问题讨论】:
-
检查包文件夹,看看错误中提到的那个子文件夹是否存在。如果是这样,请将其删除,然后再次尝试恢复。这发生在我之前,因为文件夹+ nupkg 文件存在(但没有其他内容),所以恢复不起作用。这能解决你的问题吗?
-
将 Microsoft.Net.Compilers 包更新到最新版本 2.9 并查看是否可行。
-
如果这一切都不起作用,请检查您的文件夹中是否有 %20(空格)。 Nuget 包不喜欢这样..
标签: c# visual-studio compilation nuget