I am using the Publish / Web Deploy option within VS 2010 to publish my ASP.NET MVC3 website.
However it does not by default publish my "files" folder that I have highlighted below.
Any ideas how I can get this file included during publishing?
Thanks Paul
Like when publishing website actually means delivery to a customer or in SaaS where deployment often means delivery or in packaging where deploying is done simply through installing. Second source of confusion is where publishing is delivery to customer, but they do their own deployment afterwards.
Build compiles the source code into a (hopefully) runnable application. Publish takes the results of the build, along with any needed third-party libraries and puts it somewhere for other people to run it.
To publish from Visual Studio, do the following: Change the solution configuration from Debug to Release on the toolbar to build a Release (rather than a Debug) version of your app. Right-click on the project (not the solution) in Solution Explorer and select Publish. In the Publish tab, select Publish.
A probably less common case is when someone (maybe yourself) added a <ExcludeFoldersFromDeployment>Content\files</ExcludeFoldersFromDeployment>
line in the csproj file, and then forgot about it, and later you do want to publish the folder.
Because of this line, none of the files in Content/files (and subfolders) will be deployed, even if the BuildAction is Content
.
This is hard to spot because, AFAIK, it is not visible anywhere in visual studio, you have to open the csproj file with a text editor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With