18

Project references to the various parts of the Azure SDK should live in the installation of the Azure SDK, but for some odd reason my code (an Azure Mobile Service) can no longer see Microsoft.WindowsAzure.Diagnostics:

VS2015 references screenshot

I should be able to pick the Microsoft.WindowsAzure.Diagnostics.dll up from my Azure SDK 2.7 installation, but here's what I see in the SDK's 'ref' directory:

File Explorer screenshot

I.e. I just have

  • Microsoft.WindowsAzure.ServiceRuntime.dll
  • WindowsAzureEventSource.dll
  • WindowsAzureTelemetryEvents.dll

but I do not have Microsoft.WindowsAzure.Diagnostics.dll. Interestingly there is an NuGet package called Unofficial.Microsoft.WindowsAzure.Diagnostics, with over 30,000 downloads, which suggests that I am not the only one having this problem.

Where should I reference Microsoft.WindowsAzure.Diagnostics from; is it a DLL somewhere in an SDK or in a NuGet package; where is it?

Community
  • 1
  • 1
dumbledad
  • 16,305
  • 23
  • 120
  • 273

2 Answers2

16

You can find it here: C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.7\bin\plugins\Diagnostics. With SDK version 2.5, diagnostics is now a plugin.

enter image description here

Gaurav Mantri
  • 128,066
  • 12
  • 206
  • 241
  • Your answer helped me when I had this same issue for v2.9. For v2.9 it is located here: C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.9\bin\plugins\Diagnostics – Brendan L Apr 28 '20 at 10:52
5

It's not in C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.7\ref, but is in

C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.7\bin\plugins\Diagnostics\Microsoft.WindowsAzure.Diagnostics.dll

It was a simple matter of removing the stale reference and re-adding it through the Reference Manager:

VS2015 Reference Manager

Robotnik
  • 3,643
  • 3
  • 31
  • 49
dumbledad
  • 16,305
  • 23
  • 120
  • 273