我正在为Jenkins构建一个构建奴隶,使用Ant和Ivy来构建我们的Windows应用程序。部分应用程序使用MVC3和MVC4。在我的开发PC上构建相同的解决方案。我无法更改build,sln或csproj文件以使其正常工作。
我根本不想想要安装Visual Studio。
我应该安装什么才能使其正常工作?
这是我已安装的不工作的内容:
以下是我从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]
答案 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]