24

Feel free to recommend a better title or changes to my explanation below!

I am using Windows Azure Websites (for the first time) and have connected it to a solution in Visual Studio Online (also my first time). I was also able to connect to Visual Studio Online, create a project, throw up a master page and web form connected to a master page and my Azure website updated itself. Great!

My Issue

If I add another project to the solution it seems that this new project overwrites the files in the first one. I can't figure out how to set this up so:

Project 1 -> deploy to wwwroot (happens by default great!)

Project 2 -> deploy to wwwroot/sub/directory/ (doesn't seem to work)

Could somebody explain how to configure project 2 so that when the solution auto deploys to an Azure Website that it goes to a specific location?

Markus
  • 689
  • 1
  • 7
  • 14

1 Answers1

39
  1. Go to the Configure tab for the site in Azure portal.
  2. Scroll all the way to the bottom then add a new application where ever you want like Project2 below.

    Basically the 'Project2' part is the URL after the root '/' and the 'site\wwwroot\Project2' is where the actual folder should live under the site root

  3. Download the publishing profile and import it in Visual Studio, then add the application name after your site name like below. Also remember to update the destination URL as well

hope that helps

ahmelsayed
  • 7,125
  • 3
  • 28
  • 40
  • Thank you, adding another application is exactly what I needed to do to fix my deployment issues! – Markus Jan 26 '14 at 18:28
  • Is there a way to publish second level application via PowerShell Azure scriplets? – trailmax Jun 24 '14 at 00:02
  • 1
    @trailmax I don't think this is possible from PowerShell, I will reply with more details to your question [here](http://stackoverflow.com/q/24376643/3234163) actually have you tried to set the `-Name myApp` to `-Name myApp/project2` – ahmelsayed Jun 24 '14 at 19:26
  • 1
    @ahmelsayed I've tried - no luck. Some error messages were thrown, something about incorrect site name. – trailmax Jun 25 '14 at 09:32
  • okay, that matches my speculation looking at the code. I posted more info on your other question hope that helps. I am not very familiar with PowerShell stuff. – ahmelsayed Jun 25 '14 at 17:15
  • What about creating a virtual app on a sub subdirectory? I've been trying to set the virtual root to /A/B and the physical folder to site\wwwroot\SomeFolder (as Application), but it is taking forever. Does it work? – Ayyash Apr 11 '15 at 08:57
  • This allows the two apps to be manually published to the desired locations, by publishing from within Visual Studio, but is there a way to update the continuous deployment process to follow the same changes made locally to the publish profiles? – Adam Goodwin Aug 16 '15 at 01:22
  • App settings do not seem to work with virtual applications, can anyone confirm? – Poul K. Sørensen Jun 17 '16 at 22:57