[英]MVC 5 build failing on Visual Studio Team Services
I have been trying to get Visual Studio Team Services to compile and build my MVC 5 C# project. 我一直在努力让Visual Studio Team Services编译和构建我的MVC 5 C#项目。 But I kept receiving the error messages below consistently:
但我一直收到以下错误消息:
App_Start\\BundleConfig.cs (2): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) Global.asax.cs (7): The type or namespace name 'Optimization' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) App_Start\\BundleConfig.cs (9): The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?)
App_Start \\ BundleConfig.cs(2):命名空间“System.Web”中不存在类型或命名空间名称“优化”(您是否缺少程序集引用?)Global.asax.cs(7):类型或命名空间名称'优化'在名称空间'System.Web'中不存在(您是否缺少程序集引用?)App_Start \\ BundleConfig.cs(9):找不到类型或命名空间名称'BundleCollection'(您是否遗漏了使用指令或程序集引用?)
I went through similar issue posted on stackoverflow and tried to apply the suggested solutions but none of them worked! 我在stackoverflow上发布了类似的问题并试图应用建议的解决方案,但没有一个工作! I have no idea what else could fix this issue to try.
我不知道还有什么可以解决这个问题。 I appreciate it if you could shed some lights on it.
如果你可以在它上面点亮,我会很感激。 Thanks.
谢谢。
You need to ensure that Microsoft.AspNet.Web.Optimization and all of its dependencies are installed correctly. 您需要确保正确安装Microsoft.AspNet.Web.Optimization及其所有依赖项。
Manage your Nuget Packages for the application and if it is showing as Installed, trying uninstalling and reinstalling it. 管理应用程序的Nuget包,如果它显示为已安装,请尝试卸载并重新安装。
我不得不手动编辑项目的.csproj以修复引用,这些引用指向../../OtherProject/packages/
,已提交并重建,然后构建成功。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.