创建C#项目在运行时项目

由网友(失恋的饥荒鬼)分享简介:是否有任何身体知道如何创建一个C#项目在运行时,添加类,并编译它生成一个DLL。Does any body know how can I create a C# project at runtime, add classes to it and compile it to generate a dll.推荐答案如...

是否有任何身体知道如何创建一个C#项目在运行时,添加类,并编译它生成一个DLL。

Does any body know how can I create a C# project at runtime, add classes to it and compile it to generate a dll.

推荐答案

如果你只是想编译code,并生成一个DLL,看到cdhowie的回答。

If you just want to compile code and generate a dll, see cdhowie's answer.

如果你想拥有在最后一个完整的项目文件,您可以创建通过XML或文本输出的csproj文件,它指向code(及其他)文件要包括,然后执行的MSBuild myproject.csproj。

If you want to have a complete project file at the end, you can create a csproj file through XML or Text output, which points to the code (and other) files you want to include, then execute "msbuild myproject.csproj".

打开一个项目,你有一个记事本文件的.csproj,结构并不复杂。

Open a .csproj file for a project you have with notepad, the structure isn't complicated.

阅读全文

相关推荐

最新文章