Prism Scultpure を使用すると、この問題に直面しています
誰かが私に何をすべきか助けてくれますか。R1 リージョンがありますが、次のエラーが発生します
次のコードの太字の行がエラーです
public virtual void StartAction()
{
global::System.ComponentModel.BackgroundWorker backgroundWorker = new global::System.ComponentModel.BackgroundWorker();
backgroundWorker.WorkerReportsProgress = true;
backgroundWorker.DoWork += new global::System.ComponentModel.DoWorkEventHandler(this.StartActionWorker);
backgroundWorker.RunWorkerAsync();
CandidateView candidateView = null;
foreach (object view in **this.RegionManager.Regions["R1"].Views**)
{
if (true == view is CandidateView)
{
candidateView = view as CandidateView;
break;
}
}
if (null == candidateView)
{
candidateView = this.Container.GetExportedValue<CandidateView>();
this.RegionManager.Regions["R1"].Add(candidateView);
}
this.RegionManager.Regions["R1"].Activate(candidateView);
}
構成で 1 つの構成エラーが発生しました。根本的な原因を以下に示します。詳細については、CompositionException.Errors プロパティを確認してください。1) リージョン マネージャには R1 リージョンが含まれていません。結果: モジュール 'CandidateMModule' の初期化中に例外が発生しました。- 例外メッセージ: リージョン マネージャに R1 リージョンが含まれていません。- モジュールがロードされようとしていたアセンブリは次のとおりでした:Candidate、Version=1.0.0.0、Culture=neutral、PublicKeyToken=null 詳細については、例外の InnerException プロパティを確認してください。DI コンテナーでオブジェクトを作成しているときに例外が発生した場合は、exception.GetRootException() を使用して、問題の根本原因を突き止めることができます。結果: タイプ 'Microsoft. Practices.Prism.MefExtensions.Modularity.MefModuleManager'. 結果: パーツ 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager' をアクティブ化できません。要素: Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager --> Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager --> AssemblyCatalog (Assembly="Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0, Culture =neutral, PublicKeyToken=31bf3856ad364e35") 結果: エクスポート 'Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager (ContractName="Microsoft.Practices.Prism.Modularity.IModuleManager")' を部分 'Microsoft.Practices.Prism から取得できません.MefExtensions.Modularity.MefModuleManager'. 要素: Microsoft.Practices.Prism.MefExtensions.Modularity.MefModuleManager (ContractName="