如何 动态编译自己写的代码
来源:互联网 发布:origin绘图软件2017 编辑:程序博客网 时间:2024/04/30 19:29
CSharpCodeProvider _coder=new CSharpCodeProvider();
ICodeCompiler complier=_coder.CreateCompiler();
CompilerParameters _par=new CompilerParameters();
_par.GenerateExecutable=true;
_par.OutputAssembly="sy1.exe";//设置应用程序名
_par.MainClass="sy1";//设置主类
_par.IncludeDebugInformation=true;
foreach(Assembly asm in AppDomain.CurrentDomain.GetAssemblies())
{
_par.ReferencedAssemblies.Add(asm.Location);
}
string get_Code=_code;
CompilerResults _res=complier.CompileAssemblyFromSource(_par,get_Code);
if(_res.Errors.Count>0)
{
ErrInfo pEi=new ErrInfo();
pEi.Show();
ListBox getList=pEi.getList;
foreach(CompilerError err in _res.Errors)
{
getList.Items.Add(err.ErrorText);
}
}
else
{
MessageBox.Show("success");
}
- 如何 动态编译自己写的代码
- 如何看待自己写的烂代码
- 自己写的代码
- 如何烧写自己编译的u-boot
- 如何在Qt中写自己的动态连接库
- linux的ubuntu上如何编译C和C++代码写的动态库,以及调用执行
- linux下如何编译自己的动态链接库
- 如何让自己写的代码易维护?
- 如何将自己写的代码编进系统
- 如何将自己写的代码上传到github上
- 自己写的frameset代码
- 自己写的分页代码
- 自己写的代码文件
- 自己写的代码:时钟
- 自己写的代码,备忘
- 自己写的代码2
- 自己写的代码生成器
- 汉诺塔代码自己写的
- USB设备检测的一般过程
- Samba安装
- 架设 Squid 代理服务器
- 世界上最美丽的路...
- ComboBox的DataValue值
- 如何 动态编译自己写的代码
- 如何使用 Quota
- [我的ASP.net学习历程]DataAdapter操作之(一)
- [我的ASP.net学习历程]DataAdapter操作之(二)
- Blog日渐普及 成为带宽“黑洞”?
- 快速配置weblogic8.X的应用目录
- [我的ASP.net学习历程]DataBase Settion(3)
- 使用 Microsoft SQL Server 2000 各种版本或组件而必须安装的操作系统
- 关于asp.net中文文件名超长的下载问题