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 239103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:33:31+00:00 2026-05-11T20:33:31+00:00

I have a MEF (Microsoft Extension Framework) application which loads some assemblies from a

  • 0

I have a MEF (Microsoft Extension Framework) application which loads some assemblies from a folder. I need to enumerate the assemblies that produced any exports for my application.

One way to do it is to enumerate imports calling GetExportedObject().GetType().Assembly. But it would be cleaner to do this without instantiation of imports. Is there a way to get loaded assemblies from a catalog or anything else?

I need assemblies to get their attributes like copyright, version, name and such. My folder can contain both assemblies with exports and without ones, but I need only assemblies that satisfied any imports in the app.

  • 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-05-11T20:33:31+00:00Added an answer on May 11, 2026 at 8:33 pm

    The AssemblyCatalog has an Assembly property. The AggregateCatalog does not have a way to get this information directly- there’s no guarantee that the inner catalogs even load their parts from an assembly. The DirectoryCatalog doesn’t have this capability although it might be possible to add it if there was a good reason.

    Why do you want to get the list of assemblies? You may be better off not using a directory catalag, instead just scan and load the assemblies in a directory yourself, and create an AssemblyCatalog for each one and add it to an AggregateCatalog.

    EDIT: MEF doesn’t have a way of getting a list of all the exports that were “used” in composition. You could probably write your own catalog which would return part definitions that were shells around the default part definitions and kept track of which parts had GetExportedObject called on them. You can use the APIs in ReflectionModelServices to figure out which type corresponds to a given part definition from the default catalogs. Note that writing such a catalog would probably not be a simple undertaking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 117k
  • Answers 117k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here's an example (GCC): __asm__ ("movl %eax, %ebx\n\t" "movl $56,… May 11, 2026 at 10:47 pm
  • Editorial Team
    Editorial Team added an answer If you (or your company) can spend a little money,… May 11, 2026 at 10:47 pm
  • Editorial Team
    Editorial Team added an answer It sounds like you don't want to be releasing the… May 11, 2026 at 10:47 pm

Related Questions

On a Vista machine with the valid path C:\Users\David, calling Directory.GetFiles(@C:\Users\David) throws the following
I work for a firm that provides certain types of financial consulting services in
I have a export defined as as follows in MEF preview 5 [ExportMetadata(Application, CheckFolderApplication)]
Using MEF I want to do the following. I have a WPF Shell. To

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.