Tom Troughton
Tom Troughton

Reputation: 4325

Azure web role build error: "Unable to import module Diagnostics. No manifest was found"

We have a C# web application solution configured to run on Azure cloud services. It's an old solution and builds fine locally on other engineers' laptops (has done for years), and on my previous laptop. But I have a new laptop where I've set up my development environment but this particular solution does not build.

There are two related build errors:

VS error: "Unable to import module Diagnostics. No manifest was found

The ServiceDefinition.csdef file includes this section:

<Imports>
    <Import moduleName="Diagnostics" />
    <Import moduleName="RemoteAccess" />
    <Import moduleName="RemoteForwarder" />
</Imports>

If I remove that first Import line then the build succeeds.

I've searched everywhere for a solution. There are a couple of similar questions here on SO but the answers usually come down to installation of Azure SDK, but I can confirm I have this installed at this location:

C:\Program Files\Microsoft SDKs\Azure.NET SDK\v2.9

I've run out of options. Can any of you help?

Upvotes: 2

Views: 891

Answers (3)

Oliver Bock
Oliver Bock

Reputation: 5105

The issue seems to be that the Azure SDK 2.9 that gets installed by Visual Studio setup is missing the Diagnostics plugin. On a working (old) machine, go to C:\Program Files\Microsoft SDKs\Azure\ .NET SDK\v2.9\bin\plugins and copy the Diagnostics folder into the same location on the new computer.

Upvotes: 3

Brett Merritt
Brett Merritt

Reputation: 1

I had a similar issue with "Caching" import. This worked for me:

Click to see image

The "Caching" folder was missing from the Plugins folder, so I copied it from a machine that was working. i.e. check for a missing "Diagnostics" folder.

Upvotes: 0

SuryasriKamini-MT
SuryasriKamini-MT

Reputation: 905

Please check the steps if helps to work around:

  • Check the Import Module Diagnostics Code is under the WebRole in ServiceDefinition.csdef file.

  • Configure Web.config file to add Diagnostics Module for Listeners type like:

<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener,
Microsoft.WindowsAzure.Diagnostics,
Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type=""/>
</add>
</listeners>
</trace>
</system.diagnostics>
  • Configuring the Azure Storage Account in the ServiceConfiguration.cscfg
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=[youracountnamehere];AccountKey=[youraccountkeyhere]/>
</ConfigurationSettings>
<Certificates>
</Certificates>
</Role>
</ServiceConfiguration>
  • Similar kind of issue is resolved here by re-installing the Windows Azure Tools of VS.

  • This issue has been addressing since Azure SDK 2.4 even there is no code dependent but need those modules to collect the data for debugging purposes. Try to uninstall and install again, the Azure Development Tools and its included SDK Components in VS: Visual Studio > Tools > Get Tools & Features:

enter image description here

References:

Upvotes: 0

Related Questions