none
Could not create Microsoft.WindowsAzure.Diagnostics, Version=2.0.0.0 RRS feed

  • Question

  • I am getting this error after upgrading to Windows Azure SDK 2.0. What else do I need to configure?

    Execute this code:

    private static readonly TraceSource ItpTraceSource;
    

    ItpTraceSource.TraceEvent(severity, DefaultEventId, traceMessage);


    Getting this error:

    System.Configuration.ConfigurationErrorsException was unhandled
      HResult=-2146232062
      Message=Could not create Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
      Source=System
      BareMessage=Could not create Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
      Line=0
      StackTrace:
           at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)
           at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
           at System.Diagnostics.ListenerElement.GetRuntimeObject()
           at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
           at System.Diagnostics.TraceInternal.get_Listeners()
           at System.Diagnostics.Trace.get_Listeners()
           at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
           at Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.Initialize(String[] args)
           at Microsoft.WindowsAzure.Hosts.Worker.Loader.CreateConsoleRole(Parameters parameters)
           at Microsoft.WindowsAzure.Hosts.Worker.Loader.Main(String[] args)
      InnerException: System.TypeInitializationException
           HResult=-2146233036
           Message=The type initializer for 'Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment' threw an exception.
           Source=Microsoft.WindowsAzure.ServiceRuntime
           TypeName=Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment
           StackTrace:
                at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.get_IsAvailable()
                at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitor.GetDefaultStartupInfoForCurrentRoleInstance()
                at Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener..ctor()
           InnerException: System.Runtime.InteropServices.SEHException
                HResult=-2147467259
                Message=External component has thrown an exception.
                Source=msshrtmi
                ErrorCode=-2147467259
                StackTrace:
                     at RdVipCollectionSetGetFirst(_RD_CONFIG_INSTANCE_INPUT_VIPCOLLECTION** )
                     at Microsoft.WindowsAzure.ServiceRuntime.Internal.InteropVipCollectionSet.GetFirst(InteropVipCollection& ret)
                     at Microsoft.WindowsAzure.ServiceRuntime.CurrentRoleInstanceImpl..ctor(RoleImpl role)
                     at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.DiscoverRoles()
                     at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.RefreshRoleDiscoveryCache()
                     at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment..ctor()
                     at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeEnvironment()
                     at Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment..cctor()
                InnerException: 
    

    Thursday, May 30, 2013 2:03 PM

All replies

  • your role environment ctor threw an exception, see if the versions of your Microsoft.WindowsAzure.Diagnostics dll is from SDK2.0 also check if you are missing a configuration 


    ---------------------------------- Please mark as answered if it helped Vishal Narayan Saxena http://twitter.com/vishalsaxena http://www.ogleogle.com/vishal/

    Thursday, May 30, 2013 6:34 PM
  • I checked that all projects are referencing the SDK 2.0 diagnostics dll and they are. I dug deeper into the error and started seeing this error. Why aren't the WaWorkerHost.pdb files getting generated?

    C:\Projects\ITP\Dev\code\Deploy\Itp.WindowsAzure.Hosting\csx\Debug\roles\Itp.FTPHost.Azure\base\x64\WaWorkerHost.pdb: Cannot find or open the PDB file.
    WaWorkerHost.pdb: Cannot find or open the PDB file.
    C:\Windows\WaWorkerHost.pdb: Cannot find or open the PDB file.
    C:\Windows\symbols\exe\WaWorkerHost.pdb: Cannot find or open the PDB file.
    C:\Windows\exe\WaWorkerHost.pdb: Cannot find or open the PDB file.
    C:\Users\staylor8\AppData\Local\Temp\SymbolCache\WaWorkerHost.pdb\febab93fef5b415ca6105e161b1349ed1\WaWorkerHost.pdb: Cannot find or open the PDB file.
    C:\Users\staylor8\AppData\Local\Temp\SymbolCache\MicrosoftPublicSymbols\WaWorkerHost.pdb\febab93fef5b415ca6105e161b1349ed1\WaWorkerHost.pdb: Cannot find or open the PDB file.
    SYMSRV:  C:\Users\staylor8\AppData\Local\Temp\SymbolCache\WaWorkerHost.pdb\FEBAB93FEF5B415CA6105E161B1349ED1\WaWorkerHost.pdb not found


    SYMSRV:  http://referencesource.microsoft.com/symbols/WaWorkerHost.pdb/FEBAB93FEF5B415CA6105E161B1349ED1/WaWorkerHost.pdb not found


    http://referencesource.microsoft.com/symbols: Symbols not found on symbol server.
    SYMSRV:  C:\Users\staylor8\AppData\Local\Temp\SymbolCache\WaWorkerHost.pdb\FEBAB93FEF5B415CA6105E161B1349ED1\WaWorkerHost.pdb not found


    SYMSRV:  http://msdl.microsoft.com/download/symbols/WaWorkerHost.pdb/FEBAB93FEF5B415CA6105E161B1349ED1/WaWorkerHost.pdb not found


    http://msdl.microsoft.com/download/symbols: Symbols not found on symbol server.

    Sunday, June 2, 2013 10:14 PM
  • Hi,

    You need to get the symbol file from Microsoft. Try the steps:

    http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/9477e64d-e28c-47d5-8910-3fd5094c9d8d

    Thanks,


    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 3, 2013 2:30 AM
    Moderator
  • I am referencing Microsoft's symbols location but it is still not loading the file. I am referencing the following locations.

    Microsoft Symbol Servers

    http://referencesource.microsoft.com/symbols

    It is still not loading finding the pdb file to load.

    Monday, June 3, 2013 4:05 AM
  • Hi,

    Make sure you set the cloud service project as startup project, not any role project as startup.

    Thanks,


    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 3, 2013 6:08 AM
    Moderator
  • My cloud project is currently set as the startup project.
    Monday, June 3, 2013 1:12 PM
  • Thanks for your help but I am just going to rollback to SDK 1.8.
    Monday, June 3, 2013 4:03 PM
  • did you check if the version of assembly referenced (and in the bin directory) is from SDK version 2.0, that may be what is causing it

    ---------------------------------- Please mark as answered if it helped Vishal Narayan Saxena http://twitter.com/vishalishere http://www.ogleogle.com/vishal/

    Monday, June 3, 2013 4:45 PM