MVC3 - Razor views and partial views (cshtml) are not marked as content - by Chris Snyder

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


8
0
Sign in
to vote
ID 619539 Comments
Status Closed Workarounds
Type Bug Repros 3
Opened 11/5/2010 9:45:08 AM
Access Restriction Public

Description

When a Razor view or partial view is added to a project, the file's Build Action is marked as None in the project file.  That does not pose a problem on a dev box when you have IIS targeted at your local working directory, however builds generated via a build server will not have the views included as part of the build output.  Conversely, aspx/ascx are marked as Content by default.

The result of this incorrect default build action is that runtime errors, in the form of missing views, are experienced when deploying to a test environment after a new view/partial has been added.
Sign in to post a comment.
Posted by Microsoft on 1/16/2013 at 3:41 PM
This issue should now be fixed. Thanks!
Posted by Microsoft on 11/7/2010 at 5:51 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 11/5/2010 at 10:22 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)