Locating a namespace's .dll

  • Thread starter Christopher Collis
  • 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
 
M

Mickey Williams

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top