Simple Calculator MEF Application

Simple calculator - Demonstrates the concepts and syntax of the Managed Extensibility Framework (MEF)

 
 
 
 
 
5 Star
(6)
37,576 times
Add to favorites
3/7/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • How come removing the ExtendedOperations.dll from the \Extensions directory doesn't affect the application?
    1 Posts | Last post January 14, 2019
    • I built the solution and ran the MySimpleCalculator3 app. I figured that if I were to move ExtendedOperations.dll (which adds support for the % operator) outside of the Extensions directory, the calculator would throw an error when I try the test case: '5%3' but it ran just fine. 
      
      I thought the functionality specified in ExtendedOperations was loaded at runtime. If the .dll isn't there, what is being loaded?
  • 555-555-0199@example.com
    1 Posts | Last post October 13, 2017
    • 555-555-0199@example.com
  • How ExtendedOperations.dll is loaded
    1 Posts | Last post November 07, 2014
    • I.L
      Had to open the solution is VS to figure this out. So I thought I might publish this to help others.
      
      The build output of ExtendedOperations.csproj is:
      ..\SimpleCalculator3\Extensions\
      
      so ExtendedOperations.dll is copied to the Extensions folder and this line loads it:
      catalog.Catalogs.Add(new DirectoryCatalog(@"[...]\Extensions"));
      
      Note: When you run the solution update this string:
      "C:\\Users\\SomeUser\\Documents\\Visual Studio 2010\\Projects\\SimpleCalculator3\\SimpleCalculator3\\Extensions" 
      to the location of the Extensions folder on your computer.