command line usage of csc
-
csc /t:module c:\form4.cs c:\form5.cs when i use csc.exe through the command line this works and form4.netmodule is generated in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 problem1: the compiler always generates the .netmodule files in the above folder how can i specify a path where i want to generate the .netmodule file Problem2: i am trying to do this through windows application(c#) i am using this command on button_click Process.Start(@"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\\csc","/t:module c:\form4.cs c:\form5"); this command does not work properly if there is some error in any file form4 or form5 it is indicated but when there is no error even then the .netmodule file is not generated in the above mentioned folder
-
csc /t:module c:\form4.cs c:\form5.cs when i use csc.exe through the command line this works and form4.netmodule is generated in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 problem1: the compiler always generates the .netmodule files in the above folder how can i specify a path where i want to generate the .netmodule file Problem2: i am trying to do this through windows application(c#) i am using this command on button_click Process.Start(@"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\\csc","/t:module c:\form4.cs c:\form5"); this command does not work properly if there is some error in any file form4 or form5 it is indicated but when there is no error even then the .netmodule file is not generated in the above mentioned folder
Hello, you'll find CSC options in the MSDN documentation. /out specifies the output file, see: http://msdn2.microsoft.com/en-us/library/bw3t50f3.aspx For compiling source code from within an application during runtime, I would suggest to make use of the System.CodeDom.Compiler classes (e.g. System.CodeDom.Compiler.CSharpCodeProvider) for compiling C#. There's also providers for other languages, unified under the ICodeCompiler interface (see MSDN). Regards, d.mon