Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need fully qualified type name

I need to resolve an assembly and type at runtime and I need to find the fully qualified type name. For some reason I cannot get it right, as I keep get an exception saying it cannot find the type specified.

The app.config file, in which the assembly to look for is defined, looks like this:

<configSections>
    <section name="modules" type="Microsoft.Practices.Composite.Modularity.ModulesConfigurationSection, Microsoft.Practices.Composite"/>
  </configSections>
  <modules>
    <module assemblyFile="G:\Data\Visual Studio 2008\Projects\Race Management System.Shell\ConfigurationModularity\bin\Debug\Modules\Driver.Data.Module.dll" moduleType="Driver.Data.Module.DriverDataModule, DriverDataModule" moduleName="Driver.Data.Module.DriverDataModule"></module>
  </modules>

The assembly is called: Driver.Data.Module Namespace in assembly is: Driver.Data.Module and type name is: DriverDataModule, and this is also the name of the .cs file.

I cannot seem to find how to specify the name correctly in the xml file. Can somebody help me with the fully qualified type name?

This is for a Composite WPF application.

Thanx!

like image 252
Tony The Lion Avatar asked Mar 08 '10 19:03

Tony The Lion


1 Answers

Try Driver.Data.Module.DriverDataModule, Driver.Data.Module.

You can also find the full assembly-qualified name of your type by instantiating an object of that type and examining the AssemblyQualifiedName property of its Type:

DriverDataModule module = new DriverDataModule();
string fullyQualifiedName = module.GetType().AssemblyQualifiedName;
like image 104
Adam Lear Avatar answered Sep 19 '22 15:09

Adam Lear