Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I found a workaround for the problem by using the <code>ExcludeFilesFromDeployment</code> element within the project file. I got the idea from <a href="http://blogs.msdn.com/b/webdevtools/archive/2010/04/22/web-deployment-excluding-files-and-folders-via-the-web-application-s-project-file.aspx" rel="noreferrer">Web Deployment: Excluding Files and Folders</a></p> <p>So if you need to package project files as they exist in your project directory after a successful build and associated post build steps then do the following.</p> <ol> <li>Edit "Package/Publish Web" project settings and<br> select Items to deploy to be "All files in this project folder" </li> <li>Unload the project </li> <li>Right click on the unloaded project and select to edit the project config </li> <li>Locate the <code>PropertyGroup</code> element associated to the configuration setting e.g. "Release"</li> <li><p>Within the <code>PropertyGroup</code> element add in the following elements and exclude files and folders you don't want in the package</p> <pre><code>&lt;ExcludeFilesFromDeployment&gt;*.cs;**\.svn\**\*.*;Web.*.config;*.csproj*&lt;/ExcludeFilesFromDeployment&gt; &lt;ExcludeFoldersFromDeployment&gt;.svn;Controllers;BootstrapperTasks;Properties&lt;/ExcludeFoldersFromDeployment&gt; </code></pre></li> <li><p>Save and reload your project</p></li> </ol> <p>This solves my problem for the time being but if there is a better solution then please let me know, as this is not ideal due to the hackery involved, but then again perhaps this is an uncommon deployment scenario?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload