Locating a namespace's .dll

  • Thread starter Thread starter Christopher Collis
  • Start date Start date
C

Christopher Collis

Hi, I'm writing a program with the ability to load scripts written in C# or
VB.NET using the frameworks CodeDom to compile the scripts to assembly
dynamically and use the methods pre-determined by an Interface.... anyway
the problem I've got is that when I compile the scripts I want to be able to
add references e.g

parms.ReferencedAssemblies.Add("System.Windows.Forms.dll");

will add the System.Windows.Forms reference, but I also want to do the same
for "Microsoft.DirectX" due to the fact that this scripting will require
DirectX. When doing:

parms.ReferencedAssemblies.Add("Microsoft.DirectX.dll");

it just moans that 'Metadata file "Microsoft.DirectX.dll" could not be
found'. Is there another way to find the physical location of a namespace on
the users machine i.e C:\Windows\DirectX\directX.dll or whatever it is. I
know how to get the location of the .net framework using Reflection, but I
can't figure out how to get the Managed DX location.... hmmm come to think
of it, maybe it's in the registry somewhere....

Thanks for any help,

Chris
 
Namespaces and assemblies are orthogonal. A namespace can be in multiple
assemblies, and an assembly may contain multiple namespaces.
 
Back
Top