Visual Studio的在线生成失败 - 本地作品 [英] Visual Studio Online build fails - Local works

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

问题描述

我升级到VS2015和MVC被更新到5.0。

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

我能在我的本地PC上的成功打造,但是当我签到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.

在我的项目引用来看,一切看起来OK。

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?

推荐答案

我用我的包文件夹中删除所有文件夹,只留下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天全站免登陆