68

We had previously been referring to our Windows Azure libraries via the SDK and I noticed that they have NuGet packages for them now. This is obviously way better, so I'm swapping out all of those references for the NuGet packages.

However, I can't find a NuGet package for Microsoft.WindowsAzure.ServiceRuntime.dll that contains classes such as RoleEnvironment, etc.

Are we supposed to be referencing this dll from the SDK installation and not a nuget package? That seems extremely odd. Am I just not seeing the package for this assembly?

I've now installed all of the "windowsazureofficial" tagged packages (just temporarily) and none of them seem to have the correct reference!

Allen Rice
  • 18,062
  • 13
  • 77
  • 111

9 Answers9

27

The latest Windows Azure SDK is 1.7 so If you need updated Microsoft.WindowsAzure.ServiceRuntime you would have to manually install the SDK in your machine and add those references to your role.

AvkashChauhan
  • 20,192
  • 3
  • 31
  • 64
  • 5
    Right, and I've done that. It just seems odd that they would include certain parts of the 1.6 and 1.7 SDK as NuGet Packages, but not all of the parts. – Allen Rice Jun 28 '12 at 22:39
  • 24
    Doesn't this defeat the purpose of Nuget packages? Nuget is supposed to make it easy to integrate with external libraries - why do I have to install an SDK when Nuget can already manage the proper dependencies? This needs to be fixed - why does the community need to manage the **Unofficial Service Runtime**? – SliverNinja - MSFT Jan 21 '13 at 15:35
  • @SliverNinja, the SDK contains the emulator and other stuff as well, which in turn depends on the assemblies like `MS.WA.ServiceRuntime`. Nobody needs the Unofficial Service Runtime. – bzlm May 29 '13 at 19:35
  • @bzlm - You make the assumption that everyone uses the emulator - not always the case. We rarely emulate since we already have a predefined pattern for integrating the **Service Runtime**. Nuget makes managing different versions much simpler since every developer likely has a different version depending on how often they update. It would be great if the **Service Runtime** could be managed like the [**Service Bus**](http://nuget.org/packages/WindowsAzure.ServiceBus). Also as your projects age - it may not get updated depending on the deployment cycle. This can cause maintenance issues. – SliverNinja - MSFT May 30 '13 at 13:48
  • 4
    @SliverNinja, I'm currently trying to upgrade a SDK1.8 .NET4 solution to SDK2.0 .NET4.5, and it's hell on earth. So I agree with you that it would be 1000 times better if *everything* was managed via packages. I'm just saying that since the emulator is tightly coupled with the runtime, I can understand why some assemblies are in the SDK folder and some are managed via packages. I don't think it's helpful for developers though. Adding references to the SDK folder on disk feels wrong. I was also pointing out that nobody needs the unofficial service runtime. – bzlm May 30 '13 at 19:46
  • Things have changed and the correct answer should now be David's answer. https://stackoverflow.com/a/37393352/2575839 – KRoy Sep 18 '17 at 13:20
21

How to add Microsoft.WindowsAzure.ServiceRuntime

For anyone still battling, make sure you look under Assemblies > Extensions ;) This has now got me twice within 3 months!

David
  • 613
  • 6
  • 16
8

I had a similar problem.

Option 1)

I added a dll libray in my Google Drive Storage: Microsoft.WindowsAzure.CloudDrive

In this case you should download and create a "static" link.

Option 2)

and I found a NuGet Package:

Azure SDK 2.2 DLLs

PM> Install-Package AzureSDK2.2DLLs

If you need more information, please contact me.

d.danailov
  • 8,760
  • 4
  • 47
  • 35
3

You need to install the particular version of the Azure SDK which you want to build with.

Actually you only need to install certain parts of it including the reference libraries(there are multiple parts of the SDK you can download separately) - and it depends which assemblies you are looking for.

e.g. for 2.2 or 2.3 SDK and Microsoft.WindowsAzure.ServiceRuntime or Microsoft.WindowsAzure.Diagnostics assemblies, you need the 'WindowsAzureAuthoringTools' MSI installer - not the 'WindowsAzureLibsForNet-x64' MSI, which installs some of the other reference libraries.

Tim Lovell-Smith
  • 13,077
  • 11
  • 67
  • 89
  • 2
    Microsoft.WindowsAzure.ServiceRuntime is currently in MicrosoftAzureAuthoringTools Microsoft.WindowsAzure.Diagnostics is currently in MicrosoftAzureLibsForNet Both available from Azure SDK for .NET here: https://azure.microsoft.com/en-us/downloads/archive-net-downloads/ (Azure SDK version at time of posting is 2.7) – George Helyar Nov 25 '15 at 08:20
2

There doesn't appear to be one at this time, but I found this: AnglicanGeek's Unofficial Windows Azure Service Runtime 1.6

Kyle Trauberman
  • 24,648
  • 13
  • 83
  • 116
  • 1
    I just found that, wow, really surprising that they dont support this. I guess I'll just create a nuget package for it on our internal nuget server and use that until they get around to making one – Allen Rice Jun 28 '12 at 20:57
2

It's now a regular package on NuGet:

Install-Package Microsoft.WindowsAzure.SDK

catfood
  • 3,896
  • 3
  • 27
  • 49
1

Its likely that they don't want to distribute the core parts of the SDK so you still have a requirement to install the actual SDK. I messaged (via nuget) the owners of the "windowsazureofficial" nuget packages and asked for feedback and I'll update this if I hear back.

As for upgrading, first get the sdk and then follow the upgrade instructions here. The references will automatically be updated and it will convert local references to nuget package references as well, when it can.

Allen Rice
  • 18,062
  • 13
  • 77
  • 111
1

List with all Azure Packages: Azure SDK for .NET

Note: Before downloading the SDK files, review the installation steps to understand the process and dependencies involved in installing the SDK. For SDK 1.7 and later releases, use the installation steps included with the Manual Installers links below. For SDK 1.6 and earlier, follow the installation steps listed later on this page.

d.danailov
  • 8,760
  • 4
  • 47
  • 35
1

You can find Microsoft.WindowsAzure.ServiceRuntime.dll located in the path:

Program Files\Microsoft SDKs\Windows Azure\.NET SDK\<sdk_version>\bin\runtimes\base
SliverNinja - MSFT
  • 29,007
  • 10
  • 98
  • 161