CruiseControl failing view compilation with Asp.net MVC 2 RTM
- by Robert Koritnik
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?