Robert
Robert

Reputation: 105

MVC 3 Preview 1 with Azure Development Environment

I am in the early stages of developing an Azure web project which will likely take more than six months to complete. The views which make up the UI would benefit from clean syntax provided by the Razor view engine found in the MVC 3 preview 1.

The following exception is thrown whenever the site is run as an Azure web role:

InvalidOperationException: The view 'Index' or its master was not found.
The following locations were searched:  
  ~/Views/Content/Index.aspx  
  ~/Views/Content/Index.ascx  
  ~/Views/Shared/Index.aspx  
  ~/Views/Shared/Index.ascx  
  ~/Views/Content/Index.cshtml  
  ~/Views/Shared/Index.cshtml  

Notes:

Edit:

Upvotes: 0

Views: 530

Answers (1)

Robert
Robert

Reputation: 105

When right clicking in a ActionResult method and selecting 'Add View', the CSHTML view file is created in a view directory however the Build Action property of the file is set to 'None' rather than 'Content'.

Upvotes: 2

Related Questions