Missing Microsoft.WindowsAzure.Diagnostics during Web Role deployment

21,036

Solution 1

This error you are getting because of assembly reference.

If installed Microsoft SDK, the references will be there in reference folder.If its not there then we have to browse add into Solution.Even i got the same problem while running the solution.Now i resolved this problem and its working fine.

If we installed windows azure sdk

"C:\Program Files\Microsoft SDKs\Windows Azure\.NET SDK\2012-10\ref"

all the references will be here.just add this references in to your solution and build it, will work.

Hope this may helpful,

Thanks,

Solution 2

This question is clearly answered.

However, the easiest resolution is to add the AzureSDK2.2DLLs to your web role project(s).

Share:
21,036
Andres Jaan Tack
Author by

Andres Jaan Tack

I am a programmer with Twilio in Tallinn, Estonia. I grew up in the United States. Throughout my career, I have worked a great deal with distributed computing problems and real-time signaling.

Updated on July 09, 2022

Comments

  • Andres Jaan Tack
    Andres Jaan Tack almost 2 years

    Using Visual Studio 2012 RC, from the page, I started an Azure Cloud Service. I selected MVC 4, included a test project, and enabled NuGet package restores on build.

    When I deployed this to an Azure Web Site, using git, it seems that the target box does not include either the WindowsAzure.Diagnostics or the WindowsAzure.ServiceRuntime libraries. I'm new to .NET in general, but I can't imagine what I'm missing here. Furthermore, while I can trivially remove Diagnostics from the references (no diagnostics, no problem), it doesn't seem that I can do the same with ServiceRuntime.

    Am I doing something wrong, or is this a bug in Azure Web Sites? Is it fixable?

    C:\... [master]> git push azure master
    Counting objects: 17, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (11/11), done.
    Writing objects: 100% (12/12), 216.47 KiB, done.
    Total 12 (delta 5), reused 0 (delta 0)
    remote: New deployment received.
    remote: Updating branch 'master'.
    remote: Preparing deployment for commit id '2cb9c59bd0'.
    remote: Building web project 'MvcWebRole1.csproj'.
    remote: ..
    remote:   Successfully installed 'Microsoft.AspNet.WebApi 4.0.20505.0'.
    remote:   Successfully installed 'Microsoft.AspNet.Web.Optimization 1.0.0-beta2'.
    remote:   Successfully installed 'jQuery.Validation 1.8.1'.
    remote:   Successfully installed 'Microsoft.AspNet.Razor 2.0.20505.0'.
    remote:   Successfully installed 'Microsoft.AspNet.Providers.Core 1.0'.
    remote:   Successfully installed 'Microsoft.AspNet.Providers.LocalDb 1.0'.
    remote:   Successfully installed 'jQuery.UI.Combined 1.8.11'.
    remote:   Successfully installed 'jQuery 1.6.2'.
    remote:   Successfully installed 'Microsoft.AspNet.WebApi.Client 4.0.20505.0'.
    remote:   Successfully installed 'Microsoft.AspNet.Mvc 4.0.20505.0'.
    remote:   Successfully installed 'Microsoft.AspNet.WebApi.Core 4.0.20505.0'.
    remote:   Successfully installed 'Microsoft.AspNet.WebApi.WebHost 4.0.20505.0'.
    remote:   Successfully installed 'Microsoft.jQuery.Unobtrusive.Ajax 2.0.20505.0'.
    remote:   Successfully installed 'Microsoft.jQuery.Unobtrusive.Validation 2.0.20505.0'.
    remote:   Successfully installed 'Microsoft.Web.Infrastructure 1.0.0.0'.
    remote:   Successfully installed 'Microsoft.AspNet.WebPages 2.0.20505.0'.
    remote:   Successfully installed 'Modernizr 2.0.6'.
    remote:   Successfully installed 'Microsoft.WindowsAzure.ConfigurationManager 1.7.0.0'.
    remote:   Successfully installed 'Microsoft.Net.Http 2.0.20505.0'.
    remote:   Successfully installed 'WebGrease 1.0.0'.
    remote:   Successfully installed 'EntityFramework 5.0.0-rc'.
    remote:   Successfully installed 'WindowsAzure.Storage 1.7.0.0'.
    remote:   Successfully installed 'knockoutjs 2.0.0'.
    remote:   Successfully installed 'Newtonsoft.Json 4.5.1'.
    remote: D:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resol
    ve this reference. Could not locate the assembly "Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral,
    PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by your
    code, you may get compilation errors. [C:\DWASFiles\Sites\barf\VirtualDirectory0\site\repository\MvcWebRole1\MvcWebRole1
    .csproj]
    remote: D:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9): warning MSB3245: Could not resol
    ve this reference. Could not locate the assembly "Microsoft.WindowsAzure.ServiceRuntime, Version=1.7.0.0, Culture=neutra
    l, PublicKeyToken=31bf3856ad364e35". Check to make sure the assembly exists on disk. If this reference is required by yo
    ur code, you may get compilation errors. [C:\DWASFiles\Sites\barf\VirtualDirectory0\site\repository\MvcWebRole1\MvcWebRo
    le1.csproj]
    remote: WebRole.cs(5,30): error CS0234: The type or namespace name 'Diagnostics' does not exist in the namespace 'Microsoft.WindowsAzure' (are you missing an assembly reference?) [C:\DWASFiles\Sites\barf\VirtualDirectory0\site\repository\Mv
    cWebRole1\MvcWebRole1.csproj]
    remote: WebRole.cs(6,30): error CS0234: The type or namespace name 'ServiceRuntime' does not exist in the namespace 'Microsoft.WindowsAzure' (are you missing an assembly reference?) [C:\DWASFiles\Sites\barf\VirtualDirectory0\site\repository\MvcWebRole1\MvcWebRole1.csproj]
    remote: WebRole.cs(10,28): error CS0246: The type or namespace name 'RoleEntryPoint' could not be found (are you missing a using directive or an assembly reference?) [C:\DWASFiles\Sites\barf\VirtualDirectory0\site\repository\MvcWebRole1\Mvc
    WebRole1.csproj]
    remote:
    remote: Error - Changes committed to remote repository but your website not updated.