开发者

Call Mono C# Compiler

For calling MS C# compiler there is CSharpCodeProvider (http://msdn.micro开发者_Python百科soft.com/en-us/library/microsoft.csharp.csharpcodeprovider.aspx)

but how do I call the Mono compiler?

I want to know if there was any errors after compilation.


Mono has a better approach available (which should be provided in .NET 5 probably),

http://tirania.org/blog/archive/2008/Sep-10.html


I have not used Mono, but a quick Bing turned up the following Microsoft.CSharp.CSharpCodeProvider in the Mono documentation, is it possible that Mono implements the functionality targeting the Mono C# compiler.


You should take a look at MonoDevelop. It's full featured IDE for the Mono project, speaking of C#, F# and others. You can create a project, generate the classes, paste your source and it'll take care of everything.

Speaking of the compiler: It's called mcs if you exported mono to your PATH. man mcs/mcs --help.


Probably using Microsoft.CSharp.dll from Mono will call Mono's implementation of Microsoft C# compiler which is the same as Microsoft's.

To call Mono specific features of C# compiler use Mono.CSharp.dll

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜