Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

Commented Issue: Loading Module from GAC [10053]

$
0
0
Hi,

i am facing problem loading modules from GAC.

I have a WPF desktop application (Framework 4.0) and have 5 dlls as my modules .i registered all my dlls into GAC, i have the module configuration in my app.config and i want to load module dlls from GAC instead of application path.

please help me out on this...

Regards
Ap
Comments: ** Comment from web user: fmartinez **

Hi,

Based on my understanding, in order to be able to load modules from the GAC using the configuration file, you need to:
#
+ Register all your module dll's into GAC
+ Add references to these modules dll's into your working project
+ Configure the app.config file accordingly

According to your scenario, I believe you are facing problems with the app.config file. Therefore, here is a sample of how your app.config file should look like:

```XML
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="modules" type="Microsoft.Practices.Prism.Modularity.ModulesConfigurationSection, Microsoft.Practices.Prism"/>
</configSections>
<modules>
<!-- Here you will fill the information of your module dll's -->
<!-- assemblyFile is the exact name of the module dll -->
<!-- moduleType is "namespace.classname, assemblyname, version, culture, publickeytoken" -->
<module assemblyFile="HelloWorldModule.dll" moduleType="HelloWorldModule.HelloWorldModule, HelloWorldModule, Version=1.0.0.0, Culture=neutral, PublicKeyToken=805d827e058e1047" moduleName="HelloWorldModule" startupLoaded="true" />
</modules>
</configuration>
```

Take into account that is mandatory to specify the PublicKeyToken of your assembly to avoid further errors.

Hope this helps,

Federico Martinez
http://blogs.southworks.net/fmartinez


Viewing all articles
Browse latest Browse all 1878

Trending Articles