views:

100

answers:

2

Hi!

I've been trying to deploy my ASP.NET MVC 3 Beta Application to my hosting. It supports all the necessary technologies and through trail and error I set the needed references' Copy Local to True. Then I got the error that my app cannot find the view. It listed .cshtml files it tried. I had those files in my project but they weren't deployed. I found that Visual Studio 2010 doesn't set .cshtml files' property Build Action as Content as it does for the .aspx files.

Is there a way to make Visual Studio automatically set .cshtml as Content, or will I have to set this manually to every Razor View I add?

+2  A: 

While waiting for the final release which will have full Visual Studio integration and Intellisense with the Razor view engine you may checkout this blog post and especially the section: Changing The Default Build Action For a File-Type.

Darin Dimitrov
Worked like a charm, thanks :)
gligoran