Forums: Open Discussion (Thread #29625)

【for.NET】コードリスト指定時のロードエラー (2011-06-23 10:58 by NS ABE #58183)

業務共通プロジェクトのCodeListフォルダにEnum定義を追加し、CommonSelectableValuesExtensionをロードするように.configを書き換えました。
その後業務プロジェクトの画面でSelectableValuesProviderを貼り付け、コンポーネントのSelectableCategoryNameを指定しました。

起動後、該当ページをContentPlaceHolder上にロードしようとすると、スタートアッププロジェクト「StartupApp」のconfigからunityエントリを
読み込もうとConfigurationLoader.GetConfigSection<T>(string filePath, string sectionName) がエラーになります。

StartupApp.exe.configはありますが、StartupApp.configはありません。
SelectableValuesProvider.SetProperties()のソースで、
AssemblyName assemblyName = FormUtility.GetFormAssemblyName(targetForm);
IUnityContainer container = UnityManager.GetApplicationContainer(assemblyName);
という部分でassemblyNameが「StartupApp」になるため、
RuntimeUnityContainerLoader.csのCreateApplicationContainerImporter()で、
importer.ConfigurationPath = assemblyName.Name + ".config";
部分がStartupApp.config という名前を生成しているようです。

業務共通、業務プロジェクトはそれぞれ.configを生成するようですが、スタートアッププロジェクトは生成するような設定になっていません。
アセンブリ名がStartupAppになるのがおかしいのか、StartupApp.configが生成されないのがおかしいのか、どちらでしょうか?

ちなみに、コードリストを使うまでは正常でした。

現在は、業務共通.configをStartupApp.configとしてコピーするようにビルドイベントを追加して回避しています。

Reply to #58183×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login