2 Alternate Configurations for Windows Azure Deployment


I’ve become a big fan of Windows Azure as a web application platform. One of 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 website, 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!

Sean Patterson (1)

Sean Patterson

Sr. Software Development Director

Fresh’s Sr. Software Development Director with Full-Stack capabilities, Sean brings 20 years of experience to enterprise website and application development. He is fluent in a variety of technologies, from C# and .NET to PHP and Javascript, and has developed websites and applications for the likes of Microsoft and T-Mobile. A true sophisticated technical innovator, Sean simply enjoys writing great code behind our client’s vision.