我需要在MVC 3&amp ;;的构建服务器上安装什么? 4

时间:2015-05-20 13:31:54

标签: model-view-controller msbuild

我正在为Jenkins构建一个构建奴隶,使用Ant和Ivy来构建我们的Windows应用程序。部分应用程序使用MVC3和MVC4。在我的开发PC上构建相同的解决方案。我无法更改build,sln或csproj文件以使其正常工作。

根本不想想要安装Visual Studio。

我应该安装什么才能使其正常工作?

这是我已安装的工作的内容:

  • Microsoft ASP.NET MVC 2 - VWD Express 2010工具
  • Microsoft ASP.NET MVC 2
  • Microsoft ASP.NET MVC 3
  • Microsoft ASP.NET MVC 4运行时
  • Microsoft ASP.NET MVC 4
  • Microsoft Build Tools 2013
  • Microsoft ASP.NET和Web Tools 2013.4 - 适用于Web的Visual Studio Express 2013
  • Microsoft ASP.NET和Web Tools 2013.1 - 适用于Web的Visual Studio Express 2012

以下是我从MSBuild步骤中看到的错误:

[exec] Controllers\Controller1.cs(547,10): error CS0246: The type or namespace name 'HttpPost' could not be found (are you missing a using directive or an assembly reference?) [xxx.csproj]
[exec] Controllers\Controller1.cs(547,10): error CS0246: The type or namespace name 'HttpPostAttribute' could not be found (are you missing a using directive or an assembly reference?) [xxx.csproj]
[exec] Controllers\Controller2.cs(21,10): error CS0246: The type or namespace name 'HttpPost' could not be found (are you missing a using directive or an assembly reference?) [xxx.csproj]
[exec] Controllers\Controller2.cs(21,10): error CS0246: The type or namespace name 'HttpPostAttribute' could not be found (are you missing a using directive or an assembly reference?) [xxx.csproj]

1 个答案:

答案 0 :(得分:0)

很抱歉这个浪费的问题。如果我早些时候在日志中看过,我会看到它。

事实证明,这是由Microsoft安全补丁引起的MVC 3.0.0.0与3.0.0.1引用的已知问题。

"C:\scm\opt\hg\main\core\F4I\Reporting\Foundation\Poiesis.Foundation.sln" (default target) (1) ->
"C:\scm\opt\hg\main\core\F4I\Reporting\Foundation\Security\SSO\Poiesis.ClinicalModel.Security.Web.SSO.csproj" (default target) (16) ->
  C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1605,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [C:\scm\opt\hg\main\core\F4I\Reporting\Foundation\Security\SSO\Poiesis.ClinicalModel.Security.Web.SSO.csproj]

Windows update caused MVC3 and MVC4 stop working