【发布时间】:2018-04-13 01:27:51
【问题描述】:
由于一些 git 项目更改,当我尝试构建时,我得到一个错误:
此项目引用此计算机上缺少的 NuGet 包。使用 NuGet 包还原下载它们。有关详细信息,请参阅http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 ..\packages\MSTest.TestAdapter.1.1.11\build\net45\MSTest.TestAdapter.props。
对项目的引用包含四个缺失的引用,其中两个 Microsoft.VisualStudio.TestPlatform.TestFramework 和 Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions 似乎相关。
另外两个,如果它被证明是相关的,是System 和System.Core,但它们没有引起任何问题......这很奇怪,因为我肯定会使用它们。
那个丢失的文件,即错误消息中的那个,绝对存在。
我已尝试卸载并重新安装这两个软件包,但似乎没有任何帮助。
【问题讨论】:
-
我收到此错误是因为我在运行
dotnet build <sln file name>之前尝试使用dotnet restore <sln file name>而不是nuget restore <sln file name>。使用nuget restore <sln file name>,它开始工作了。
标签: c# visual-studio mstest