如何使用CodeDOM命名空间编译多个文件 [英] How do i compile multi files using CodeDOM namespace
本文介绍了如何使用CodeDOM命名空间编译多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好.......
如何使用CodeDOM命名空间编译多个文件;
我可以将代码编译为字符串或单个文件,但是如果我有多个文件(如VS make)(单独的文件),如Form1.cs(我们可以编写事件和任何自定义代码),以及Form1.Designer.cs(可以由VS生成代码)..
那么,如果我有
我该如何编译它们?
Hello .......
How do i compile multi files using CodeDOM namespace;
I can compile code as string or single file but if I have multi file like VS make (separate files) like Form1.cs which we write events and any custome code and Form1.Designer.cs which VS generate code .....
So how do i compile them if i have
using System.codeDOM;
名称空间.
推荐答案
最简单的方法是在代码中使用Process.Start
:
命令行
The easiest way is to use the command line in your code withProcess.Start
:
csc /out:output.dll /target:library file1.cs file2.cs file3.cs
这篇关于如何使用CodeDOM命名空间编译多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文