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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:30:17+00:00 2026-06-18T02:30:17+00:00

I can`t find System.ComponentModel.Composition.Initialization.dll in .NET 4.5 (Which contains the declaration of the CompositionInitializer

  • 0

I can`t find System.ComponentModel.Composition.Initialization.dll in .NET 4.5 (Which contains the declaration of the CompositionInitializer class). Has this assembly been removed from MEF in .NET 4.5?
How can I now compose parts of an application marked with [Export] and [Import] attributes?

Suppose I have this view:

    internal partial class StartWindow : Window
    {
        public StartWindow()
        {
            InitializeComponent();
            DataContext = ViewModel;
        }

        [Import]
        public IStartWindowViewModel ViewModel { get; set; }
    }

and the appropriate ViewModel:

    [Export]
    internal class StartWindowViewModel : IStartWindowViewModel
    {
        public IEnumerable<Customer> Customers { get; set; }
    }

What should I add in my shell (or elsewhere) to compose these parts?

  • 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-18T02:30:18+00:00Added an answer on June 18, 2026 at 2:30 am

    The CompositionInitializer and similar classes exist in Silverlight, but not the full .NET Framework. The MEF team purposefully decided to leave them out, as they felt that they were not appropriate.

    The logic was that construction injection should be used instead.

    That being said, the logic which applied in Silverlight for using the class applies exactly the same in WPF. I have blogged about this in .NET 4, and included an implementation that works for the full framework.

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

Sidebar

Related Questions

I can't find this attribute in EF5: http://msdn.microsoft.com/en-us/library/system.componentmodel.dataannotations.schema.foreignkeyattribute.aspx Can someone tell me where it
I can't find any documentation on implementing a class that inherits System.Windows.Media.Brush - what
I simply can not get Visual Studio 2005 to find the System.Configuration.ConfigurationManager class. Here
I have questions about System.Threading.ThreadStart Class : where can I find its specifications (
I've added the reference to System.Runtime.Serialization dll to my project but still can't find
I want to know where I can find the System.Web.MVC dll in a system,
How can we find the system type (i.e. 32-bit or 64-bit) using Python...?
I can't find [WebInvoke] and [WebGet] . I have already add System.ServiceModel reference. what
In *nix systems one can use which to find out the full path to
This is probably a really silly question, but I can't seem to find an

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.