部分团队成员的Nuget还原无法正常工作-Microsoft.AspNet.Mvc和其他核心软件包 [英] Nuget restore for some team members does not work - Microsoft.AspNet.Mvc and other core packages

查看:53
本文介绍了部分团队成员的Nuget还原无法正常工作-Microsoft.AspNet.Mvc和其他核心软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2015社区以及我们团队中的其他社区。我创建的MVC Web应用程序可以在我的机器上正常运行,但是当其他人可以构建它时,所有软件包都可以成功下载,但是某些核心MVC(例如Microsoft.AspNet.Mvc,Razor等)无法安装。

I'm using Visual Studio 2015 community along with some other in our team. A mvc web application that I created works fine on my machine but when others get it to build, all packages download successfully but some of the core MVC such as Microsoft.AspNet.Mvc, Razor, etc don't install.

如果他们进入PM并将MVC软件包降级为5.2.2,然后再升级回5.2.3,那么在他们的机器上这是很奇怪的。但是现在在我们的构建服务器上建立构建时,我们会遇到同样的问题!

What was weird that on their machine, if they went into PM and downgraded the MVC package to 5.2.2 and then upgraded back to 5.2.3 it worked. But now when setting up the build on our build server, we get the same issue!

有人知道为什么这种奇怪的行为吗?

Any ideas why this bizarre behavior?

推荐答案

没有检查,但是为什么会这样呢?当开发人员将一揽子版本的版本降级然后再升级回原样时,

Didn't check that but why would that matter? When the Dev downgrades the version on 1 package and then upgrades back everything is as it should be

编辑(2016年10月4日)经过一堆调查:
其中一位开发人员提交了 Packages文件夹,该文件夹位于具有 Microsoft.AspNet.Mvc和其他文件夹但没有dll的根目录下。这使得还原软件包实际上不是还原这些文件夹,因为该文件夹已经存在,但是在运行构建时,工件中实际上并没有存在要移动到bin中的文件夹。

EDIT (4th Oct 2016) after investigating a bunch of things: One of the developers at one point committed the "Packages" folder which sits at the root which had the "Microsoft.AspNet.Mvc" and other folders but without the dlls. This made the "Restore packages" not really "Restore" these as the folder already existed but when the build was run the artifacts weren't actually there in the folder to be moved into bin.

我删除了packages文件夹,将其添加到gitignore中,并进行了更改,使所有内容都变为绿色!

I deleted the packages folder, added it to gitignore and committed the change which made everything 'green'!

这篇关于部分团队成员的Nuget还原无法正常工作-Microsoft.AspNet.Mvc和其他核心软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆