Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 "Publish" does not copy Razor view files

When using the built-in Publish feature of Visual Studio 2010 with a web application that includes Razor views (.cshtml or .vbhtml), the publish service does not copy the Razor view files.

This occurs both on a local "File System" publish as well as a remote publish using Web Deploy, using the November 9 Release Candidate.

Are there any known workarounds?

like image 558
Portman Avatar asked Nov 10 '10 16:11

Portman


1 Answers

You need to set the build action to "Content" under properties.

Edit: You have to do this on each of the files that aren't being copied over.

Edit 2: I did some poking around, and found a forum posting over at msdn, sounds like you can edit the registry, or create a pkdef file.

http://social.msdn.microsoft.com/Forums/en/vsxprerelease/thread/c0212d15-96c4-455d-b7e1-d299c5ef384a

like image 132
Ted Ballou Avatar answered Nov 09 '22 23:11

Ted Ballou