2012-10-07 10 views
10

ローカルAzure環境をデバッグしようとすると、システムがクラッシュしました。このエラーが発生しました。「ファイルを読み込めませんでした。アセンブリ 'Microsoft.WindowsAzure.Diagnostics'またはその依存関係の1つ。ファイルまたはアセンブリ 'Microsoft.WindowsAzure.Diagnostics'またはその依存関係の1つを読み込めませんでした

私は次のものを再インストールしました。MS VS 2012年6月sp1、Windows Azureエミュレータ - 2012年6月、Windows Azure Librarires for .NET - 2012年6月)を再インストールしました。

まだ同じ問題がある場合は、何か提案があります。

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

あなたはそれを整理できましたか?私はちょうどクラッシュして何も動作しません - 同じエラー – Turowicz

答えて

8

アプリケーションの起動時にこのようになっているようです。あなたのweb.configを見て、Microsoft.WindowsAzure.Diagnosticsアセンブリを指しているトレースリスナを持っていますか?それがあなたのアプリケーションがうまくいかない理由かもしれません。

まず、アセンブリ参照を確認し、Microsoft.WindowsAzure.Diagnosticsを削除してください(古いバージョンを使用しないようにする)。次に、Microsoft.WindowsAzure.Diagnosticsへの参照を追加しますが、バージョン1.7.0.0であることを確認してください。

あなたはこのアセンブリの正しいバージョンを見つける必要があります:C:\プログラムファイル\マイクロソフトのSDK \ WindowsのAzure.NET SDK \ 2012から06 REF \

+0

私はrefを持っています。 1.7.0.0。 btw:これはAzureで動作しますが、ローカルのdevには問題があります。破損しているか、ファイルがありません。私は元気になっていますが、問題はそれ以上のものです。 – Floyd

+0

ありがとうございました!私はすべての参照を更新しましたが、トレースリスナーを認識していませんでした! – dopplesoldner

4

Sandrinioの答え(残念私ドン」に追加しますトン)権限を持っている私は、1.7.0.0を参照された同様のエラーが発生しましたが、私のweb.configファイルでこのセクションでは、バージョン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> 

を指摘し、私はそれをコメントアウトし、問題が解決されました。

4

私はこれが古いトピックです知っているが、それはまだ「ファイルまたはアセンブリMicrosoft.WindowsAzure.Diagnosticsをロードできませんでした」のトップ、Googleの結果なので、ここで私がやったことです:

これは、と私に起こっていましたAzure SDK 2.7.1とVisual Studio 2013をインストールしました.Windows 10とAzure SDK 2.7にアップグレードする間に、何かが正しくインストールされませんでした。 Azure SDKを再インストールして、Visual Studio 2015にアップグレードしましたが、どちらもうまくいきませんでした。

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

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

へのお知らせ "2.5.0.0" を "2.7.0.0" からの変更:私はようやく私のApp.configファイルに次の行を変更しなければなりませんでした。私にとって、Microsoft.WindowsAzure.Diagnostics 2.7.0.0 DLLは存在しませんでした。 2.5.0.0に戻すと正常に動作します。根本的な原因を見つけたいと思っていますが、私はより重要なことを進めていきます。お役に立てれば!

+0

鉱山は2.5.0.0〜2.8.0.0 – Catwood

1

Microsoft.WindowsAzure.Diagnosticsのプロパティをチェックして、使用しているバージョンを確認するのが最善の方法です。私がDan.とTaylorが言及したWeb.config要素にプラグインしたところで2.8.0.0と言います。 2.7.0.0は私のためには機能しませんでした2.8.0.0でしたが、明日はそうでないかもしれません;-)。

+0

ベストアンサー - 魔法は "試してください"または "それを削除" – Dunc

関連する問題