Web Deploy: how do I include specific files in a webdeploy package?
- I am transitioning my web application solution from xcopy deployment to Web Deploy deployment.
- I have a PostBuild action that generates files the web app needs at runtime.
- I want to use the 'Only files needed to run this application' option.
The generated files are, of course, not in the solution - which means that they don't get picked up by the setting above (which I want to use in order to avoid a long, long, ugly list of files-to-exclude). I know that there's a way to exclude files and folders explicitly, but is ther开发者_开发百科e a way to include files explicitly?
Sayed Ibrahim Hashimi would seem to disagree with the current answer.
http://sedodream.com/2010/05/01/WebDeploymentToolMSDeployBuildPackageIncludingExtraFilesOrExcludingSpecificFiles.aspx
According to this article you can modify the project file / create your own targets file that will include a specific file or folder by tying into the current build pipeline.
No such mechanism exists. The best practice is to set up the aforementioned long list of exclusions, and use the "all files" option.
精彩评论