Answer the question
In order to leave comments, you need to log in
How to run program code from another program in c# ?
I am interested in the implementation of the following situation (specifically in c#):
1) In a program (written in c#), a regular form with a field, the code is written in c#
2) The code is written in example.cs file
3) The code is compiled using the csc.exe command and an example.exe file should appear.
4) example.exe implements the usual Test Case, for example, to log in to the site. But the catch is that you write the code in another program and, without closing the program, you must run this fresh code.
After all, I want the user to be able to write code (from the main program) and run it (without closing the main program).
At the moment I have a problem with csc.exe c# compiler. The fact is that I use some.dll, which I wrote myself, and the link to it is not automatically indicated (when you create a project, you specify links to libraries - refference) when you create a new .cs file. Those. I write to the file: using some;
And since there is no link to some.dll, the compiler gives an error. Help me please.
Answer the question
In order to leave comments, you need to log in
example.exe is best generated using CSharpCodeProvider
Links to .dll can be added via CompilerParameters
read in the direction of multi-domain programs, when the plugin is executed in a separate domain, loaded, unloaded, and so on
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question