【发布时间】:2015-05-13 13:22:05
【问题描述】:
我正在尝试为 Github 上的一个项目做出贡献(第一次)。 我在解决方案中添加了一个新项目并添加了 NUnit 和 AutoFixture(通过 Nuget),现在当我克隆该存储库时,它缺少对 NUnit 和 AutoFixture 的所有引用。
现在,当我发出拉取请求(在我知道它缺少引用之前)时,它启动了一个 AppVeyor 构建并且失败了......
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1697,5):
warning MSB3245: Could not resolve this reference. Could not locate the assembly "nunit.core.interfaces".
Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
[C:\projects\projectName\Client.Tests\Client.Tests.csproj]
我不知道如何解决这个问题,有人有什么想法吗?我已经在互联网上搜索了没有运气...
【问题讨论】:
-
尝试搜索 NuGet 包还原。并查看 Visual Studio 中的包管理器控制台。它会告诉你它需要恢复丢失的包。
-
@StuartGrassie 是的,这是正确的。但是在我恢复之后它很好,但是如果有人在 Git 中克隆,那么它就是同样的问题。任何构建都会因此而中断?
-
您必须启用自动恢复,您可以在 Visual Studio 中执行此操作:docs.nuget.org/consume/package-restore
-
@dcastro 我不确定我是否遵循了我需要更改的内容?
标签: c# git github reference nuget