Dynamic Assembly

  • Thread starter Thread starter web1110
  • Start date Start date
W

web1110

Hi y'all,

I was playing with the ability to dynamically create an assembly.

I created a windows application in which I created a CSharp program in a
disk file, compiled it etc. My problem is that the dll calls
MessageBox.Show() and this is causing errors in the compilation.

What I need to know is what assemblies must I employ (via 'using' and
CompilerParameters.ReferencedAssemblies.Add()) to permit a dynamically
created dll to call MessageBox.Show()?

Thanx,
Bill

PS If 'using System;' references 'system.dll'
Does 'using qqq;' reference 'qqq.dll'?
What about 'using AAA.BBB.CCC'? Can I infer a dll name from the using
specification?
 
Bill,
What I need to know is what assemblies must I employ (via 'using' and
CompilerParameters.ReferencedAssemblies.Add()) to permit a dynamically
created dll to call MessageBox.Show()?

The MessageBox class is implemented in the System.Windows.Forms
assembly.

PS If 'using System;' references 'system.dll'
Does 'using qqq;' reference 'qqq.dll'?

No, assemblies and namespaces are different things, though they tend
to have similar names.

What about 'using AAA.BBB.CCC'? Can I infer a dll name from the using
specification?

No, the AAA.BBB.CCC namespace can be implemented in any number of
assemblies.



Mattias
 
Back
Top