开发者

C# Compiler Switch for TargetFrameworkVersion

im trying to compile an assembly at r开发者_高级运维untime with CSharpCodeProvider and i would like to know which compiler switch to use to target for example .NET Framework 2.0.


You should be able to do something like this:

Dictionary<string,string> options = new Dictionary<string,string>
{ 
    {"CompilerVersion", "v2.0"}
};

var compiler = new CSharpCodeProvider(options);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜