2011-07-14 14 views
5

このプロジェクトのビルドは、私の友人のコンピュータでは動作していますが、私のものでは動作していません。バインディングエラーが検出されました。 'Microsoft.Practices.EnterpriseLibrary.Validation'

この戻りライン上の

:私は次のエラーを取得しています

protected static Database Connection2 
{ 
    get 
    { 
     try 
     { 
      return DatabaseFactory.CreateDatabase("HermesDB"); 
     } 
     catch (Exception e) 
     { 
      //Corpnet.Elmah.Error.Add(e); 
      return null; 
     } 
    } 
} 

:ここ

The assembly with display name 'Microsoft.Practices.EnterpriseLibrary.Validation' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Validation' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.Practices.EnterpriseLibrary.Validation'

=== Pre-bind state information === LOG: User = MLABS\agordon LOG: DisplayName = Microsoft.Practices.EnterpriseLibrary.Validation (Partial) LOG: Appbase = file:///C:/Documents and Settings/agordon/My Documents/Projects/BulkUploadToLOMDatabase/BulkUploadToLOMDatabase/bin/Debug/ LOG: Initial PrivatePath = NULL Calling assembly : Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=null. === LOG: This bind starts in default load context. LOG: Using application configuration file: C:\Documents and Settings\agordon\My Documents\Projects\BulkUploadToLOMDatabase\BulkUploadToLOMDatabase\bin\Debug\BulkUploadToLOMDatabase.vshost.exe.config LOG: Using machine configuration file from c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\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:/Documents and Settings/agordon/My Documents/Projects/BulkUploadToLOMDatabase/BulkUploadToLOMDatabase/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Validation.DLL. LOG: Attempting download of new URL file:///C:/Documents and Settings/agordon/My Documents/Projects/BulkUploadToLOMDatabase/BulkUploadToLOMDatabase/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Validation/Microsoft.Practices.EnterpriseLibrary.Validation.DLL. LOG: Attempting download of new URL file:///C:/Documents and Settings/agordon/My Documents/Projects/BulkUploadToLOMDatabase/BulkUploadToLOMDatabase/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Validation.EXE. LOG: Attempting download of new URL file:///C:/Documents and Settings/agordon/My Documents/Projects/BulkUploadToLOMDatabase/BulkUploadToLOMDatabase/bin/Debug/Microsoft.Practices.EnterpriseLibrary.Validation/Microsoft.Practices.EnterpriseLibrary.Validation.EXE.

は私が持っているすべての参照です:

enter image description here

私はダウンロードをしました最新のエンタープライズライブラリをインストールして、私はすべてのDL上の写真のLSはそれらのすべての更新されたバージョンです。

何が間違っていますか?

+0

設定ファイルにはrefがありますか?任意の古いDLLに? –

答えて

10

申し訳ありません解決策を見つけました。私は答えとして例外を無効にすることは決してできませんでした。何らかの形で間違っているようです....

以前のアセンブリや現在のアセンブリの以前のバージョンでは、特定の参照が外部で使用されていたようです。たとえあなたのコードがそれらの参照を放棄してから長いかもしれませんが、名前はアセンブリの中で検索されていて、どこか不思議なところです。あなたのAssemblyInfo.csファイルに

移動し、ThemeInfoを見つける:

[assembly: ThemeInfo(
ResourceDictionaryLocation.ExternalAssembly, //where theme specific resource dictionaries are located 
//(used if a resource is not found in the page, 
// or application resource dictionaries) 
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 
//(used if a resource is not found in the page, 
// app, or any theme specific resource dictionaries))] 

変更] none 'に最初の場所:

[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 
//(used if a resource is not found in the page, 
// or application resource dictionaries) 
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 
//(used if a resource is not found in the page, 
// app, or any theme specific resource dictionaries))] 

そして、あなたの例外を保つには、オン!私はこの似たような性質のさまざまな質問にこの答えを掲示します。 >タブのデバッグ - >のWindows->例外設定 - - >出力右下の下の設定ボード - >管理のデバッグVisual Studioで2015:

6

これは致命的なエラーではありません。潜在的な問題を警告する管理デバッグアシスタントです。
デバッグ、例外に移動し、チェックを外します。

F5を押すだけで、実行を継続することもできます。

+0

ありがとうございます!!!!!!!!!!!!!!!!!!!!!!!! –

+0

は素晴らしいシャベルを持っています –

+0

チェックボックスが無効になっていますどのようにチェックを外すことができますか? –

1

クリーニング/binフォルダが

0

バインディング障害修正この問題を解決するために私を助けましたアシスタント - > BindingFailureのチェックを外してください

関連する問題