This project is read-only.


Problem with Prism 5 MEF


i have a problem to use it with Prism 5 and MEF.
I had Build a RibbonWindow and import your libs through NuGet.
In my Bootstrapper i had inserted Following Code:
protected override Microsoft.Practices.Prism.Regions.RegionAdapterMappings ConfigureRegionAdapterMappings()
            var regionAdapterMappings = ServiceLocator.Current.GetInstance<RegionAdapterMappings>();
            if (regionAdapterMappings != null)
                regionAdapterMappings.RegisterMapping(typeof(Ribbon), ServiceLocator.Current.GetInstance<Prism.RibbonRegionAdapter.RibbonRegionAdapter>());

            return base.ConfigureRegionAdapterMappings();
as in your doc but i receive the following errormessage:
"Microsoft.Practices.ServiceLocation.ActivationException" ist in Microsoft.Practices.ServiceLocation.dll aufgetreten.

Zusätzliche Informationen: Activation error occurred while trying to get instance of type RibbonRegionAdapter, key ""

Whats wrong??
Closed Jul 10, 2015 at 11:41 AM by uTILLIty
nothing to do


CarlosAdrian wrote Jul 10, 2015 at 9:34 AM

Similar problem here. It says:
File 'c:\DEV\CodePlex\PrismRibbonRegionAdapter\Prism.RibbonRegionAdapter\RibbonRegionAdapter.cs' does not exist

I do not have that directory, so it seems to be that the NuGet package is looking for the file in c:\DEV... instead of the right place.

Any solution?

Thank you

CarlosAdrian wrote Jul 10, 2015 at 10:05 AM

Problem solved. I was using Microsoft.Windows.Controls.Ribbon instead of System.Windows.Controls.Ribbon.


uTILLIty wrote Jul 10, 2015 at 11:38 AM

Hi, the debugger is looking for the .cs file, not the code. So the actual error is seen, when you press "cancel" on the debugger's prompt to find the source code file (so it can show the exact line the error occured on).

I'm glad you could sort it out, though!

regards, Tilli

uTILLIty wrote Jul 10, 2015 at 11:40 AM

Please also only create an issue, when there is actual work to do. For questions and problems always create a new thread in the "discussions" area first (as I only get email notifications to discussions, not for issues). thanks!