投影完了

Enterprise Library for .NET Framework 2.0の自前アプリへの組み込み成功。
共通で使用するdll内でも例外処理やロギングを行う必要がある。
この場合の構成情報の配置に悩んだのだが、昨日一日調査した結果、大枠は把握できた。
結局、以下の要領で動作を確認した

application1.exe(起動されるプログラム)
 (app.config=application1.exe.configに構成情報を保持)
     ↓
panda728.dll(共通処理dll、エラー処理を実行)

このような形でdll側でEntLib2.0を使用する場合、
同じAppDomainなら、構成情報の配置場所を意識することなく使用できる。
参照設定はapplication1.exe、panda728.dllの両方で設定する必要がある。

ついでに言うと、panda728.dllにて、System.Reflection.Assembly.LoadFromで取り込んだdllでも同様にEntLib2.0を利用可能(検証済み)。

application1.exe(起動されるプログラム)
 (app.config=application1.exe.configに構成情報を保持)
     ↓
panda728.dll(共通処理dll)
     ↓
pand728plugin.dll(プラグインdll)
 (panda728.dllからAssembly.LoadFromで読み込まれてもOK)

結局、深く悩まなくても、最初にapp.configを試していたら、ココまでの苦労は不要だった悪寒○| ̄|_

参照設定が必要なのは
Microsoft.Practices.EnterpriseLibrary.Caching.Cryptography.dll
Microsoft.Practices.EnterpriseLibrary.Caching.Database.dll
Microsoft.Practices.EnterpriseLibrary.Caching.dll
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Data.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Logging.Database.dll
Microsoft.Practices.EnterpriseLibrary.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Security.Cache.CachingStore.dll
Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll
Microsoft.Practices.EnterpriseLibrary.Security.dll
Microsoft.Practices.ObjectBuilder.dll

このぐらいかな。末尾が.Configuration.Design.dllのモノは実行時不要なのかな。
CachingとかSecurityとかも不要な気がするけど、設定しだいで利用されるかもしれないので念のため入れておく