How to write a batch program that compiles a C # console application

Source: Internet
Author: User

How to write a batch program that compiles a C # console application2011-03-22 18:14 dc Poison Mushroom | Browse 579 times
Recently read a tutorial online, is learning C #, but my machine is not loaded with VS, so want to write a batch to compile, because each time I want to change the directory, and then copy the path, then compile, output, a special waste of time, so specifically to help the netizen, hope to help
Share to: report | 2011-03-22 19:17#快乐假期, the wisdom to accompany #The questioner is adopted by
I don't know if you've ever used ant, you can create an ant script to build your application.
If you are not familiar with, and do not want to write, I introduce you a visual programming of the Ant script software (Download the 30-day use of license), you may be mainly used in the Ant script exec command.
Http://www.placidsystems.com/virtualant/Default.aspx
Ask:
Sorry, I am a novice, you said in the inside of something I do not understand eh
have been learning three layers of architecture, just don't know how to make up, because not in depth to understand some of the previous learning things, not skilled, do not know how to compile
Chase Answer:
1, this ..... Please refer to http://ant.apache.org/
2, can also write their own batch (BAT), but maintenance is more troublesome.
3, this method for you should be easier to start, that is to write a C # program, let him help you complete, in order to maintain the convenience, you can write your configuration information into a file (the format can be XML or other). By the time, simply run the program you wrote, you can automatically help you compile your program.

I suggest you choose a third way above.
Ask:
My idea is the second and 3rd combination, but I don't seem to
Chase Answer:
No problem, check the documentation.
Http://msdn.microsoft.com/zh-cn/library/system.diagnostics.process%28v=VS.71%29.aspx
You can call your external application through the process and let it compile your C # code.
Questioner evaluation
Thank you.

How to write a batch program that compiles a C # console application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.