Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to get DirectoryModuleCatalog to work?
    primarykey
    data
    text
    <p>I am using Prism 4 and MEF for a WPF project. I have some DLL that needs to be loaded from a directory. These DLL implements <em>IModule</em> through <em>IGame</em> and are properly formed (or at least I think so) : </p> <pre><code>[Module(ModuleName = "SnakeModule")] class SnakeModule : IGame { public void Initialize() { Console.WriteLine("test"); } public void StartGame() { throw new NotImplementedException(); } } </code></pre> <p>Currently, the main project is compiling but the module doesn't get initialized. I have trouble understanding how to setup my bootstrapper and the documentation isn't helping much since it doesn't have full example with a <em>DirectoryModuleCatalog</em>. The modularity quickstart isn't compiling either. Here is my bootstrapper :</p> <pre><code>class BootStrap : MefBootstrapper { protected override DependencyObject CreateShell() { return ServiceLocator.Current.GetInstance&lt;Shell&gt;(); } protected override void InitializeShell() { Application.Current.MainWindow = (Window)this.Shell; Application.Current.MainWindow.Show(); } protected override void ConfigureAggregateCatalog() { this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(BootStrap).Assembly)); } protected override IModuleCatalog CreateModuleCatalog() { DirectoryModuleCatalog catalog = new DirectoryModuleCatalog() { ModulePath = @"..\..\..\GameTestLib\bin\Debug" }; return catalog; } protected override void ConfigureContainer() { base.ConfigureContainer(); } } </code></pre> <p>Paths for the DLLs are correct. To sum up, my question is : How should I setup my bootstrapper ?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload