Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello every1!! :D
OK, this is very weird...I've read on the MSDN documentations that there's a namespace called "Microsoft.CSharp" and that it contains a class called "Compiler" with a method called "Compile", which I need to use...but there's a problem, I have this at the top:
using Microsoft.CSharp;Then I type in "Compiler." and IntelliSense doesn't do anything...so then I try "Microsoft.CSharp." and Compiler isn't in the list!! :(
What's the problem?? do I need to include a reference??
Thanx!! ;)(PS: I used spaces instead of dots on the subject because it said it wasn't valid...)
El-Trucha
http://www.truchasoft.tk
ftp://tsfc.homeftp.net
hotline://tsfc.ath.cx

What you are talking about is called the Managed C# Compiler. This is used for doing otf (on-the-fly) complies. For instance, let's say that you want to have modules that can extend your program. you can have .cs files that are compiled against a core system at run-time.
To use this you must right-click on References from within the Solution Explorer and choose Add Reference. Then press the letter M and you should be at Managed C# compiler. click ADD and then OK and you will have added the reference to your app.
Then in the class where you want to use it...at the top in the using section type:
using Microsoft.CSharp.Then within that class you can type:
Microsoft.CSharp. and Compiler will popup (along with other stuff)Hope this help,
Chi
They mostly come at night...mostly

Managed C# Compiler...so that was it, huh?? MUCH THANX!!!!! ;) ;) ;) !! :P
El-Trucha
http://www.truchasoft.tk
ftp://tsfc.homeftp.net
hotline://tsfc.ath.cx

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |