CruiseControl failing view compilation with Asp.net MVC 2 RTM

Posted by Robert Koritnik on Stack Overflow See other posts from Stack Overflow or by Robert Koritnik
Published on 2010-04-09T09:07:23Z Indexed on 2010/04/09 9:13 UTC
Read the original article Hit count: 465

Tehnologies: - CruiseControlNet - Asp.net MVC 2 RTM - enabled view compilation

The problem is UrlParameter.Optional setting. I can't seem to make it work when I use this setting inside a view.

When I compile inside Visual Studio, everything works fine, but when CCNet uses MSBuild to compile it it fails with following error:

errorCS0103: The name 'UrlParameter' does not exist in the current context

pointing to the line inside my view where this parameter is set on:

Html.RenderAction(...)

that sets certain route parameter(s) to optional.

I tried adding <%@ Assembly name="System.Web.Mvc" %> at the top of my view, but it didn't work either. It works of course when I disable view compilation, but that's not really an option. And I also don't want to set my optional parameters to string.Empty.

Anyone has any hint on this?

© Stack Overflow or respective owner

Related posts about msbuild

Related posts about cruisecontrol.net