Web Apps

2 Alternate Configurations for Windows Azure Deployment

April 18, 2014

I’ve become a big fan of Windows Azure as a web application platform. One my favorite features is that you can use GitHub or BitBucket as a repository source, and Azure will download, recompile, and deploy your solution whenever you commit changes to it.

By default, Azure deployments will grab the first web application project in your solution and use the release configuration contained in it for deployment. This may not be how your solution is configured or how you want to deploy the project. Fortunately, there are a couple of settings that allow you to change this.

To make these changes, log in to your Azure control panel, select your web site, and then select the “Configure” option. From there, scroll down to the “App Settings” section and configure accordingly.

Use a Different Project

For one project, we kept a “webui” solution that was a static HTML site to demonstrate UI/UX for the customer. This project was not the first project in the solution. In order to have Azure deploy this project, I added the following setting:

Key: Project
Value: webui/webui.csproj

This told Azure to pull the code from that particular folder and use it for deployment. Since the .csproj file has all of the required files listed in it, it was able to compile and deploy without a problem. You can do the same by replacing the folder/project file name with your appropriate values.

Use the Debug Deployment Configuration

For this same project, I had a test database and URL setup and kept the appropriate web.config tranform values in my web.debug.config file. In order to have Azure compile with these values, I added  the following setting:

Value: -p:Configuration=Debug

If you’ve generated other web.config transform files, you can replace the “Debug” value with the appropriate transformation name.

That’s all there is to it. Save the settings, go back to your deployments section and click either the “Sync” or “Redeploy” buttons and your changes will show up momentarily.

By enabling these settings, there was no need to make any special file changes or to keep test values in a release configuration. We let the deployment tool work as it should. I hope this helps you with your Azure deployments!

Enhanced by Zemanta

Sean Patterson

Software Development Director

Sean Patterson is a Software Development Director at Fresh Consulting. By day he develops applications at Fresh with the motto "If you can dream it, I can build it." By night he's a java overlord (of the coffee persuasion), aspiring running junkie, spider killer for his wife, and silly daddy to his twin daughters.

Unless otherwise specified, source code in this post is licensed under a
Creative Commons Attribution 4.0 International license (CC BY 4.0).

  • Awesome. Both of those really useful, thanks 🙂

You might also like...



3 Ways to Automate the Detection of Website Vulnerabilities

There is no such thing as perfect security, only varying levels of insecurity. -Salman Rushdie Although the context of this quote is completely irrelevant to the internet and web development, the content of the quote is perfectly applicable to web security. However, if you manage, develop, or run a website, and you value the security … Continued



Dev Principle #6: Plan Out Your Tech Stack

Architecting an application and deciding on the key components of the technology stack that go into building it is an important task. If software hadn’t worked out as a career, my backup was construction. There are many similarities – from crafting the blueprints to laying the foundation, from choosing your materials to building the structure … Continued



Top 12 PHP Development Tools and Tips

Most developers have their go-to PHP development tools, libraries, and best practices to streamline workflows and create clean, lean code. So, we asked our developers to let us in on their favorites. Here are their top tools, tips, and tricks to help you create great apps. 1. Use PHPUnit for unit testing to catch bugs. –Elisha, Front-End Developer 2. Utilize the PHPStorm text … Continued