我有一个多项目解决方案,在几个项目中安装了Prism Nuget软件包。 然后我尝试使用Nuget Package Manager UI(我已经将其添加到其他项目之一)添加一个Prism Mef扩展包到其中一个项目中。
我第一次尝试添加软件包时,未能安装其中一个依赖项,没有具体的错误原因,只是“失败”。 所以,我再次安装了它,似乎都很好,没有错误报告,但是有几个参考文件没有解决。
所以,我卸载了软件包和所有依赖项,并重新安装。 再次,一切看起来都很好,但更多的参考文献没有解决
我曾尝试卸载并安装该包,但每次都得到相同的结果。
我曾多次遇到过这个问题,并且我知道它并非特定于Prism包,因为我已经使用过不同的包。
我认为它只是Nuget的一个重大缺陷,但我希望有人会知道一个简单的方法来解决它。 我想我通常在Nuget控制台上取得更好的成功,但我觉得使用更多的努力。
我在网上做了一些搜索,并没有真正找到解决问题的原因或解决方法的一个很好的解释。
有人在工作中完全拒绝与Nuget有任何关系,因为他有这么多问题,但我决心让它工作!
I have a multi-project solution with Prism Nuget packages installed in several projects. I then attempted to add a Prism Mef extensions package to one of the projects using the Nuget Package Manager UI (I have already added it to one of the other projects).
The first time I attempted to add the package, it failed to install one of the dependencies, no specific error reason, just "failed". So, I installed it a second time, all seemed to be fine, no errors reported, but a few of the references did not resolve.
So, I uninstalled the package and all dependencies and installed it again. Again all appeared fine, but more references do not resolve.
I have tried uninstalling and installing the package more times but get the same result every time now.
I have had this problem many times and I know its not specific to the Prism package as I've had it with loads of different packages.
I think its just a major bug with Nuget, but I'm hoping somebody will know an easy way to fix it. I think I usually have better success with the Nuget console, but I find it more effort to use.
I've done some searching online and not really found a good explanation of the cause of the problem or a way to resolve it.
Somebody at work completely refuses to have anything to do with Nuget as he has so many of these issues, but I am determined to make it work!
最满意答案
在软件包管理器控制台中运行以下命令:
Update-Package -reinstall这将重新安装该项目中的每个nuget包,以解决任何缺失的引用。
如果你知道你错过了一个具体的参考:
Update-Package -reinstall <Package-Name>I just closed Visual Studio and reopened it and references are resolved...!
更多推荐
发布评论