Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2010 Web Publish missing a file

I'm finding that when publishing a website from Visual Studio its not uploading one of my files. Its a Razor file with a '.cshtml' extension (its doing the others!) and its part of the project.

Any ideas why it would exclude it?

like image 352
Ian Warburton Avatar asked Apr 26 '11 11:04

Ian Warburton


People also ask

How do I publish a file in Visual Studio?

Right-click on the project (not the solution) in Solution Explorer and select Publish. In the Publish tab, select Publish. Visual Studio writes the files that comprise your application to the local file system. The Publish tab now shows a single profile, FolderProfile.

How do I publish my website in Visual Studio?

On the computer where you have the ASP.NET project open in Visual Studio, right-click the project in Solution Explorer, and choose Publish. If you have previously configured any publishing profiles, the Publish pane appears. Click New or Create new profile. Select the option to import a profile.


1 Answers

In Visual Studio, right-click on the file and go to Properties.

Under the file's properties, make sure that Build Action is set to Content. Otherwise it won't be published via web deploy.

like image 58
Petrus Theron Avatar answered Oct 03 '22 05:10

Petrus Theron