I have had a few issues with people using old versions of the Windows Azure SDK with AzureRunMe (This isn't helped by the fact that there are at least three different versions of 1.4 in existence).
I wanted to display the Windows Azure SDK version when AzureRunMe starts, but it turned out to be more work than I'd expected. This information isn't currently available from any of the APIs.
There is a file called RoleModel.xml that gets written to the %RoleRoot% that has an attribute with the SDK version.
So here is the code
public string GetWindowsAzureSDKVersion()
{
try
{
// Warning this is undocumented and could break in a future SDK release
string roleModelFile = Environment.GetEnvironmentVariable("RoleRoot") + "\\RoleModel.xml";
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(roleModelFile);
return xmlDocument.GetElementsByTagName("RoleModel")[0].Attributes["version"].Value;
}
catch (Exception e)
{
return "unknown";
}
}
So now when AzureRunMe starts, you get something like:
Information RD00155D362047: 2011-05-28 09:20:47Z AzureRunMe 1.0.18.37253 on Windows Azure SDK 1.4.20407.2049
I know that this is unsupported and will probably break in some future version of the SDK, but needs must.
*The opinions expressed on this site are my own and do not necessarily represent those of Two10degrees or Active Web Solutions Ltd.