Visual Studio在线构建失败 - 本地工程 [英] Visual Studio Online build fails - Local works

查看:242
本文介绍了Visual Studio在线构建失败 - 本地工程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我升级到VS2015,MVC更新到5.0。

I upgraded to VS2015, and MVC was updated to 5.0.

我可以在我的本地电脑上构建成功,但当我签到Visual Studio Online时,和我的CI构建版本,它失败:

I am able to build successfully on my local PC, but when I checkin to Visual Studio Online, and my CI build builds, it fails:

类型或命名空间名称'Mvc'不存在于命名空间'System.Web'参考?)

"The type or namespace name 'Mvc' does not exist in the namespace 'System.Web' (are you missing an assembly reference?)"

我已经使用nuget管理器删除,并在我的项目上重新安装MVC。同样的结果。

I've used nuget manager to remove, and re-install MVC on my project - same results.

查看我在项目中的引用,一切都好起来。

Looking at my references in the project, all looks OK.

我在错误发生之前也注意到日志:

I also notice in the log before the error happens:

Installing 'Microsoft.AspNet.Razor 3.2.3'.
Installing 'Microsoft.AspNet.Mvc.FixedDisplayModes 5.0.0'.
Successfully installed 'Microsoft.AspNet.Mvc.FixedDisplayModes 5.0.0'.
Successfully installed 'Microsoft.AspNet.Razor 3.2.3'.
All packages listed in packages.config are already installed.

但是它似乎在构建时,它不知道什么是MVC。如何解决这个问题?

But it seems when it builds, it doesn't know what MVC is. How can I resolve this?

推荐答案

我通过删除我的Packages文件夹中的所有文件夹,只留下repositories.config来解决这个问题。这将强制VSOnline恢复每个版本上的所有软件包。

I fixed this by removing all the folders within my Packages folder, leaving only repositories.config. This forces VSOnline to restore all the packages on each build.

这篇关于Visual Studio在线构建失败 - 本地工程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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