Dependency Injection in prism training kit

Feb 29, 2012 at 5:13 AM

hi every one,

i'm doing Dependency Injection Exercise 2 in prism training kit,but i have an error on bootstrapper.Run();

the error is: "Failed to load type for module UIMessagesModule. 
If this error occurred when using MEF in a Silverlight application, please ensure that the CopyLocal property of the reference to the MefExtensions assembly is set to true in the main application/shell and false in all other assemblies. "

 

here is my Bootstrapper code: 

protected override IModuleCatalog CreateModuleCatalog()      

{            

return                Microsoft.Practices.Prism.Modularity.ModuleCatalog.CreateFromXaml(System.IO.File.OpenRead("ModuleCatalog.xaml"));

}

 

and here is my ModuleCatalog.xaml :

<Modularity:ModuleCatalog xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                xmlns:sys="clr-namespace:System;assembly=mscorlib"               xmlns:Modularity="clr-namespace:Microsoft.Practices.Prism.Modularity;assembly=Microsoft.Practices.Prism">    <Modularity:ModuleInfo Ref="file://ModuleA.dll" ModuleName="ModuleA" ModuleType="MvvmLight1.ModuleA.ModuleA, ModuleA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" InitializationMode="WhenAvailable" >        <Modularity:ModuleInfo.DependsOn>            <sys:String>UIMessagesModule</sys:String>        </Modularity:ModuleInfo.DependsOn>    </Modularity:ModuleInfo>
    <Modularity:ModuleInfo Ref="file://UIMessagesModule.dll" ModuleName="UIMessagesModule" ModuleType="MvvmLight1.UIMessagesModule.UIMessagesModule, MvvmLight1.UIMessagesModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" InitializationMode="WhenAvailable" />
</Modularity:ModuleCatalog>

 

can anyone help me plzzzz???