xxx of yyy characters
Join Group
Microsoft .NET Programmers
Google Translation:
Off
When Google Translation is on, topics and messages in this group will be machine-translated to your language by Google.
Messages
Topic:
Compiling / Running C# code without an IDE
Hi all....
Quick Question...
I'm trying to create a software application that will allow users to enter c# code into an editor (that i will create) and have them run the code without having to have an IDE etc open.
I was wondering whether all that good stuff (syntax analysing, semantic checking, etc etc) was doable without having to use an IDE.
Are there any classes etc that will let me input a "text file" of code and return any error messages etc i.e. bugs in the code?
Any help is appreciated.
Cheers dudes and... dudettes ;-)
Oct 8, 2006
4:33 PM
HI Rehan,
You are building a very interesting tool that will eventually be very useful. I have never tried to build anything similar, but what I do know is that every Microsoft .NET project consists also of a list of parameters (which can get quite complex) that will be used as command line parameters to the CSC application (in case of c#) or vbc (in case of VB).
If you open the Visual Studio 2005 Command prompt and type either CSC or VBC and press enter, you will notice that these are the .NET compilers that conver the programming code into CLR (Common Language Runtime).
I wish you a good luck in your task and hope to have given you a good start on what needs to be done.
Regards
Neville Bonavia
Jun 7, 2007
1:23 AM
Yes, you can do it.
If you open the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 folder, you will see a csc.exe application. csc (C Sharp Compiler) can convert your C# codes in a text file to an intermediate language.
Dec 20, 2007
2:40 AM
it's definitly doable and one answer was already given (using the command line csc C-Sharp compiler). Another simple thing is to simply use the .NET build in Compiler Class which you can use in your source code. This can compile also the code during runtime and returns errors in the code
Feb 19, 2008
1:25 PM
Hello,
There is also a tool called NANT, which is mainly used to build .NET projects.
Nev.
Feb 20, 2008
10:11 PM