Saturday, November 01, 2008
by Nik Kalyani
Saturday, November 01, 2008 1:37:21 PM (Pacific Standard Time, UTC-08:00)

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 <PropertyGroup> element:

    <RoleType>Web</RoleType>
    <ServiceHostingSDKInstallDir Condition=" '$(ServiceHostingSDKInstallDir)' == '' ">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v1.0@InstallPath)</ServiceHostingSDKInstallDir>

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

RSS feed
Search and Links
Bling

View Nik Kalyani's profile on LinkedIn

Contact me: nik*kalyani.com (replace "*")

TechBubble
www.flickr.com
This is a Flickr badge showing public photos from techbubble. Make your own badge here.
Statistics
Total Posts: 217
This Year: 0
This Month: 0
This Week: 0
Comments: 247
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009
Nik Kalyani
Sign In
All Content © 2009, Nik Kalyani