In this stream, I take some time to start working on the Prism for WPF documentation. Prism uses Microsoft’s DocFX framework for generating its documentation and has it integrated with Azure DevOps. This mean that whenever a change is made to the documentation GitHub repo, the docs are automatically built and published to our website.

Brian Lagunas

View all posts

2 comments

Your email address will not be published. Required fields are marked *

  • Brian,
    I have enjoyed all of your Prism work starting with 6.3 up to present. I have been trying to get the DynamicDirectoryModuleCatalog to work (it works great by itself) but when I try to do what I have done in the past with returning a new ModuleCatalog that concats multiple catalogs together it fails.
    // This works

    //protected override IModuleCatalog CreateModuleCatalog()
    //{
    // var directoryModuleCatalog = new DirectoryModuleCatalog() { ModulePath = @”.\Modules” };
    // directoryModuleCatalog.Load();

    // var configurationModuleCatalog = new ConfigurationModuleCatalog();
    // configurationModuleCatalog.Load();

    // var xamlModuleCatalog = ModuleCatalog.CreateFromXaml(
    // new Uri(“/VNCExplore_LearnPrism_BrianLagunas;component/XamlCatalog.xaml”, UriKind.Relative));

    // return new ModuleCatalog(
    // directoryModuleCatalog.Modules.OfType()
    // .Concat(configurationModuleCatalog.Modules.OfType())
    // .Concat(xamlModuleCatalog.Modules.OfType())
    // );
    //}

    // This works

    //protected override IModuleCatalog CreateModuleCatalog()
    //{
    // var dynamicDirectoryModuleCatalog = new DynamicDirectoryModuleCatalog(
    // Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “ModulesDynamic”));
    // return dynamicDirectoryModuleCatalog;
    //}

    // This does not.

    protected override IModuleCatalog CreateModuleCatalog()
    {
    var dynamicDirectoryModuleCatalog = new DynamicDirectoryModuleCatalog(
    Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “ModulesDynamic”));
    dynamicDirectoryModuleCatalog.Load();

    var configurationModuleCatalog = new ConfigurationModuleCatalog();
    configurationModuleCatalog.Load();

    var xamlModuleCatalog = ModuleCatalog.CreateFromXaml(
    new Uri(“/VNCExplore_LearnPrism_BrianLagunas;component/XamlCatalog.xaml”, UriKind.Relative));
    xamlModuleCatalog.Load();

    return new ModuleCatalog(
    dynamicDirectoryModuleCatalog.Modules.OfType()
    .Concat(configurationModuleCatalog.Modules.OfType())
    .Concat(xamlModuleCatalog.Modules.OfType())
    );
    }

    It works if the DLLs are in the folder at startup. It does not if dropped in after startup. Any clues appreciated. It is some kind of cross domain issue I believe.

    And as I mentioned. It is find if DynamicDirectoryModuleCatalog is used all by itself. Only an issue when returning Concat’d ModuleCatalog from CreateModuleCatalog(..)

    Prism.Modularity.ModuleNotFoundException: ModuleA1Module was not found in the catalog
    Thrown from LoadModules(…) in DynamicDirectoryModuleCatalog.cs

    Keep up the TOTALLY AWESOME work. Gonna learn Angular from you next.

    Christopher

    • Hard to say. I know I have used an AggregateModuleCatalog in the past to combine multiple catalogs. If you do a web search for AggregateModuleCatalog, you should find the source code. Maybe that will help you use multiple catalogs.

Follow Me

Follow me on Twitter, subscribe to my YouTube channel, and watch me stream live on Twitch.