问题描述
我的团队不得不移动到新的git实例.足以从旧服务器迁移所有分支的家伙错过了我正在使用的功能分支.我作弊的解决方案是将我在旧功能分支中添加的项目复制到我的桌面上,克隆新的回购,创建一个新的功能分支,将.csproj和所有.cs文件复制到适当位置的目录中,然后从解决方案资源管理器中添加现有项目.
My team had to move to a new git instance. The guy that was goodly enough to migrate all the branches from our old server missed a feature branch I'm working in. My cheat-y solution was to copy the project I had added in my old feature branch to my desktop, clone the new repo, make a new feature branch, copy the .csproj and all the .cs files into the directory at the appropriate place, then add the existing project from the solution explorer.
当我尝试构建时,出现错误:
When I try to build, I get an error:
对该项目的引用包含四个缺少的引用,其中两个(Microsoft.VisualStudio.TestPlatform.TestFramework和Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions)似乎相关.其他两个,如果证明是相关的话,分别是System和System.Core,但它们不会引起任何问题...这很奇怪,因为我正在使用它们.
The references to the project contain four missing references, two of which (Microsoft.VisualStudio.TestPlatform.TestFramework, and Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions) seem to be related. The other two, in case it proves to be relevant are System, and System.Core, but they aren't causing any problems... which is weird, cause I'm deffo using them.
无论如何...该文件(错误消息中的那个文件)绝对存在.我尝试卸载并重新安装两个软件包,但似乎无济于事.谁能告诉我我想念的东西吗?
Anyway... that file, the one from the error message, is absolutely there. I've tried to uninstall and reinstall both packages, but nothing seems to help. Can anyone tell me what I'm missing?
推荐答案
使用您喜欢的文本编辑器打开项目.csproj
文件,并删除对
Open the projects .csproj
file with your favourite text editor and delete any references to
这样做是安全的,所有发生的事情是您删除了DLL,但是由于某种原因或其他原因,您的项目文件仍将其引用为依赖项.
This is safe to do so, all that happened is that you have removed the DLL but for one reason or another your project file still references it as a dependency.
这篇关于为什么Visual Studio无法找到此nuget包的.props文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!