简体   繁体   中英

command line building from C#

I would like to make a C# app, that automatize .cs files building, using cmd.exe. I've learned that a line like this "%windir%\\Microsoft.NET\\FrameWork\\v3.5\\csc.exe /target:exe +.cs file's location" builds the file, and that works fine manually of course. How ever from a C# code i haven't managed to build any yet.

Can somebody please help in this problem? Or is there another way this is done?

Thank you!

总有Proces.Start(Environment.ExpandEnvironmentVariables(String.Format(@"%windir%\\Microsoft.NET\\FrameWork\\v3.5\\csc.exe /target:exe {0}", filepath)));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM