Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8148723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:42:06+00:00 2026-06-06T14:42:06+00:00

I have a main app that will have many plugins. Here is the PluginReader

  • 0

I have a main app that will have many plugins. Here is the PluginReader class in my main app:

Public Class PluginReader
 <ImportMany(GetType(IWebPlugin))>
    Private m_WebPlugins As IEnumerable(Of Lazy(Of IWebPlugin))

    Public Sub New()

    End Sub

    Public Property WebPlugins As IEnumerable(Of Lazy(Of IWebPlugin))
        Get
            Return m_WebPlugins
        End Get
        Set(value As IEnumerable(Of Lazy(Of IWebPlugin)))
            m_WebPlugins = value
        End Set
    End Property   
End Class

In my plugin I have this code:

<Export(GetType(IWebPlugin))>
<PartCreationPolicy(CreationPolicy.NonShared)>
Public Class PluginClass
    Implements IWebPlugin
    'Code to implement IWebPlugin here

My custom controller factor reads my plugin’s exports correctly and I can see that the IWebPlugin is exported, but the ImportMany is not being populated.

If you need any clarification please let me know! Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:42:07+00:00Added an answer on June 6, 2026 at 2:42 pm

    I had to add a compose method to the PluginReader class.

     Private Sub Compose()
    
            Dim catalog As AggregateCatalog = New AggregateCatalog()
            catalog.Catalogs.Add(New DirectoryCatalog(AppDomain.CurrentDomain.BaseDirectory & "bin"))
            Dim container As New CompositionContainer(catalog)
            container.ComposeParts(Me)
    
        End Sub
    

    This was my constructor:

    Public Sub New()
            Compose()
        End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, In the Flash app I'm building, I have a main SWF that will
I have an app that opens a non-modal form from the main form. The
I have an app that so far consists of two Activities: The Main Menu
i have a mvvm app that the main window is a tab control. i
I have a widget that is a part of my main app. Usually when
I have a widget that supposed to call an Activity of the main app
I am making an app in which i have a main activity that the
I have module application. When I run it, the main window of that app
The main idea is that I have several worker instances of a Rails app,
I'm creating my first android app that will make use of SQlite. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.