Home Dashboard Directory Help
Search

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


Status: 

Closed
 as Fixed Help for as Fixed


8
0
Sign in
to vote
Type: Bug
ID: 619539
Opened: 11/5/2010 9:45:08 AM
Access Restriction: Public
1
Workaround(s)
view
3
User(s) can reproduce this bug

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.
Details
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)
Sign in to post a workaround.
Posted by Aaron Weiker on 11/5/2010 at 9:53 AM
Whenever you add a new view, you have to remember to go to the properties for that view and change the compile action to "Content".