WebDeploy - Additional Files

charles's Avatar


30 Sep, 2014 02:43 PM

We want to deploy our web application using WebDeploy to Azure Websites. Actually in our build, we have a grunt task that generates some javascript files that are not included in the .csproj file.

We need to push these files, they must be included in the WebDeploy package.

What is the best way to achieve that?

  1. Support Staff 1 Posted by Feodor Fitsner on 30 Sep, 2014 03:52 PM

    Feodor Fitsner's Avatar

    Will look into that. Right now working on the same problem with another customer.

  2. 2 Posted by charles on 30 Sep, 2014 05:09 PM

    charles's Avatar

    Cool, I think I could use a workaround for now, but did not find info in the documentation about how to exlude files from Artifacts?

    In fact, I would like to bundle my web application in an artifact but remove all the *.cs and other files that are not necessary, is there a way to do that?

  3. Support Staff 3 Posted by Feodor Fitsner on 30 Sep, 2014 05:17 PM

    Feodor Fitsner's Avatar

    OK, I think I've got something.

    This is a toy project: https://github.com/appveyor/simple-web/tree/master/MyWebApp

    Our objective is adding contents of GeneratedContent directory into Web Deploy package (of course, initially GeneratedContent is not part of web project.

    We will be adding those additional files into *.csproj file in before_build block.

    I created a simple PS utility for patching csproj file: https://github.com/appveyor/simple-web/blob/master/add-project-cont...

    and this is how it's being called: https://github.com/appveyor/simple-web/blob/master/appveyor.yml#L17


    You can download those zips and check their contents.

    I think add-project-content.ps1 could be used multiple times to add several folders as it just inserts ItemGroups before closing </Project> tag.

    Hope that helps. Let me know if you have any questions.

  4. 4 Posted by charles on 30 Sep, 2014 05:19 PM

    charles's Avatar

    Cool! You rock! Will give it a try later today.

    Amazing support and product.

  5. 5 Posted by charles on 01 Oct, 2014 04:25 AM

    charles's Avatar

    Got it working! Thanks for the help.

  6. 6 Posted by Tom on 21 Aug, 2015 04:07 AM

    Tom 's Avatar

    Is this still the recommended way to add generated content to be deployed?

  7. Support Staff 7 Posted by Feodor Fitsner on 21 Aug, 2015 04:22 AM

    Feodor Fitsner's Avatar
  8. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:59 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac