2012-10-07 7 views
10

Mein System ist vor ein paar Tagen abgestürzt, seitdem ich beim Versuch, lokale Azure-Umgebung zu debuggen, diesen Fehler 'Konnte Datei nicht laden oder Assembly 'Microsoft.WindowsAzure.Diagnostics' oder eine seiner Abhängigkeiten '.Datei oder Assembly 'Microsoft.WindowsAzure.Diagnostics' oder eine der zugehörigen Abhängigkeiten konnte nicht geladen werden

Ich habe Folgendes neu installiert (Windows Azure-Tools für MS VS 2012 Juni 2012 SP1, Windows Azure-Emulator - Juni 2012, Windows Azure Librarires für. NET - Juni 2012).

Immer noch die gleichen Probleme, irgendwelche Vorschläge.

=== Pre-bind state information === 
LOG: User = ........... 
LOG: DisplayName = Microsoft.WindowsAzure.Diagnostics 
(Partial) 
WRN: Partial binding information was supplied for an assembly: 
WRN: Assembly Name: Microsoft.WindowsAzure.Diagnostics | Domain ID: 2 
WRN: A partial bind occurs when only part of the assembly display name is provided. 
WRN: This might result in the binder loading an incorrect assembly. 
WRN: It is recommended to provide a fully specified textual identity for the assembly, 
WRN: that consists of the simple name, version, culture, and public key token. 
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue. 
LOG: Appbase = file:///C:/Projects/Client/Connection Intelegence/CICloud/CIWebRole/ 
LOG: Initial PrivatePath = C:\Projects\Client\Connection Intelegence\CICloud\CIWebRole\bin 
Calling assembly : (Unknown). 
=== 
LOG: This bind starts in default load context. 
LOG: Using application configuration file: C:\Projects\Client\Connection   Intelegence\CICloud\CIWebRole\web.config 
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. 
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind). 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/9cc4e65f/1fb72ae3/Microsoft.WindowsAzure.Diagnostics.DLL. 
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/9cc4e65f/1fb72ae3/Microsoft.WindowsAzure.Diagnostics/Microsoft.WindowsAzure.Diagnostics.DLL. 
LOG: Attempting download of new URL file:///C:/Projects/Client/Connection Intelegence/CICloud/CIWebRole/bin/Microsoft.WindowsAzure.Diagnostics.DLL. 
LOG: Using application configuration file: C:\Projects\Client\Connection Intelegence\CICloud\CIWebRole\web.config 
LOG: Using host configuration file: C:\Program Files\IIS Express\config\templates\PersonalWebServer\aspnet.config 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config. 
LOG: Post-policy reference: Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 



[FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))] 
[FileLoadException: Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))] 
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0 
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +210 
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +242 
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +17 
System.Reflection.Assembly.Load(String assemblyString) +35 
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +122 
[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))] 
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +12761078 
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +503 
System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +142 
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +334 
System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +203 
System.Web.Compilation.BuildManager.ExecutePreAppStart() +152 
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1151 

[HttpException (0x80004005): Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057 (E_INVALIDARG))] 
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540 
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159 
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12722601 
+0

hast du es geschafft, es zu sortieren? Ich hatte gerade einen Unfall und nichts funktioniert - selbe Störung – Turowicz

Antwort

8

Es sieht so aus, als ob Ihre Anwendung gestartet wird. Werfen Sie einen Blick auf Ihre web.config, haben Sie einen Trace-Listener auf die Microsoft.WindowsAzure.Diagnostics Assembly zeigen? Das könnte der Grund sein, warum Ihre Anwendung nicht funktioniert.

Zuerst, werfen Sie einen Blick auf Ihre Assembly Referenzen und löschen Microsoft.WindowsAzure.Diagnostics sollte es vorhanden sein (nur um sicher zu sein, dass wir keine alten Versionen verwenden). Fügen Sie dann einen Verweis auf Microsoft.WindowsAzure.Diagnostics hinzu, stellen Sie jedoch sicher, dass es sich um Version 1.7.0.0 handelt. : C: \ Programme \ Microsoft SDKs \ Windows Azure.NET SDK \ 2012-06 \ ref

+0

Ich habe eine ref. für 1.7.0.0. Übrigens: Das funktioniert auf Azure, nur bei lokalen Entwicklern ist das Problem.Muss korrupt sein oder fehlende Dateien. Was ich ertragen habe, aber das Problem bleibt ihnen. – Floyd

+0

Vielen Dank! Ich hatte alle Referenzen aktualisiert, war mir aber des Trace Listeners nicht bewusst! – dopplesoldner

4

Hinzufügen zu Sandrinio Antwort (sorry I don‘

Sie sollten die richtige Version dieser Baugruppe in finden t haben Privileg) ich einen ähnlichen Fehler hatte, wo 1.7.0.0 verwiesen wurde, aber dieser Abschnitt in meinem web.config deutete auf Version 1.0.0.0

<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> 

bemerkte ich es aus und das Problem wurde gelöst .

4

Ich weiß, dies ist ein altes Thema, aber es ist immer noch das Top-Google-Ergebnis für „kann nicht Datei oder Assembly Microsoft.WindowsAzure.Diagnostics laden“, also hier ist das, was ich getan habe:

Dies wurde mir geschieht mit das Azure SDK 2.7.1 und Visual Studio 2013. Irgendwo zwischen dem Upgrade auf Windows 10 und Azure SDK 2.7 wurde etwas nicht richtig installiert. Ich habe versucht, das Azure SDK neu zu installieren und auf Visual Studio 2015 zu aktualisieren, aber beide haben nicht funktioniert. Ich hatte schließlich die folgende Zeile in meinem app.config zu ändern:

<system.diagnostics> 
    <trace> 
     <listeners> 
      <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics"> 
       <filter type="" /> 
      </add> 
     </listeners> 
    </trace> 
</system.diagnostics> 

zu

<system.diagnostics> 
    <trace> 
     <listeners> 
      <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics"> 
       <filter type="" /> 
      </add> 
     </listeners> 
    </trace> 
</system.diagnostics> 

Hinweis der Wechsel von "2.7.0.0" auf "2.5.0.0". Für mich war Microsoft.WindowsAzure.Diagnostics 2.7.0.0 DLL nicht vorhanden. Das Zurücksetzen auf 2.5.0.0 funktioniert einwandfrei. Ich möchte immer noch die Ursache finden, aber ich habe wichtigere Dinge, zu denen ich mich bewegen kann. Hoffe das hilft!

+0

Mine war 2.5.0.0 bis 2.8.0.0 – Catwood

1

Es kann am besten sein, die Eigenschaften von Microsoft.WindowsAzure.Diagnostics zu überprüfen, um zu sehen, welche Version Sie verwenden. Mine sagt 2.8.0.0, als ich das in das Web.config-Element steckte, das von Dan und Taylor oben erwähnt wurde, funktionierte es. 2.7.0.0 hat bei mir nicht funktioniert 2.8.0.0 aber morgen kann es anders sein ;-).

+0

Beste Antwort - keine Magie "versuche das" oder "lösche das". – Dunc

Verwandte Themen