Compile a c# code at runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have read the Microsoft.CSharp.CSharpCodeProvider in MSDN webpage and also
a few article according to compile a c# at runtime. But i found that these
pages still lack some completeness, such as, how to reference to external
DLL(s) from the c# or etc. Therefore, I am here to ask some of you that might
please tell me other articles that could be fullfill my need.

I have to build a project that have a custom c# code and it need to be
compiled and run on fire; in which the code has to reference serveral
external DLLs.

Please help me out.
Thank
 
Hi,

Did you check
ICodeCompiler Interface
..net help file.
There is a CompilerParameters class that holds referenced assemblies.
 
I have already read that page ...... Well, actually what i need is a complete
example. ^^''

Miha Markic said:
Hi,

Did you check
ICodeCompiler Interface
..net help file.
There is a CompilerParameters class that holds referenced assemblies.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

mrVithan said:
I have read the Microsoft.CSharp.CSharpCodeProvider in MSDN webpage and
also
a few article according to compile a c# at runtime. But i found that these
pages still lack some completeness, such as, how to reference to external
DLL(s) from the c# or etc. Therefore, I am here to ask some of you that
might
please tell me other articles that could be fullfill my need.

I have to build a project that have a custom c# code and it need to be
compiled and run on fire; in which the code has to reference serveral
external DLLs.

Please help me out.
Thank
 
Maybe this is not the "complete example" you need but you may find
the following interesting :
http://oraclevsmicrosoft.blogspot.com/2004/12/code-generation-with-net.html

Hope this helps.


OracleVsMicrosoft
Comments are welcome

http://OracleVsMicrosoft.blogspot.com



I have already read that page ...... Well, actually what i need is a complete
example. ^^''

Miha Markic said:
Hi,

Did you check
ICodeCompiler Interface
..net help file.
There is a CompilerParameters class that holds referenced assemblies.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com

mrVithan said:
I have read the Microsoft.CSharp.CSharpCodeProvider in MSDN webpage and
also
a few article according to compile a c# at runtime. But i found that these
pages still lack some completeness, such as, how to reference to external
DLL(s) from the c# or etc. Therefore, I am here to ask some of you that
might
please tell me other articles that could be fullfill my need.

I have to build a project that have a custom c# code and it need to be
compiled and run on fire; in which the code has to reference serveral
external DLLs.

Please help me out.
Thank
 
Back
Top