Cloud

Enabling a Pre-existing Project as a WebRole in Azure Solution

November 1, 2008

author:

Enabling a Pre-existing Project as a WebRole in Azure Solution

In trying to use an existing VS2008 Project as a WebRole in a Windows Azure Solution, I discovered that the project did not appear as a candidate for selection from the Roles > Add > Web Role Project in solution menu. All the Azure documentation indicates that there is no special requirement for a web project to be a candidate for Azure, so I found this to be odd. The solution, as it turns out, is pretty simple:

1) Open the existing project’s .csproj file in a text editor.

2) Add the following two lines of code anywhere within the first element:

Web
$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v1.0@InstallPath)

Reload the project and it now becomes available as a WebRole.

Founder NftyDreams; founder Decentology; co-founder DNN Software; educator; Open Source proponent; Microsoft MVP; tech geek; creative thinker; husband; dad. Personal blog: http://www.kalyani.com. Twitter: @techbubble
Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.