开发者

C# Compiler Switch for TargetFrameworkVersion

开发者 https://www.devze.com 2023-01-10 11:05 出处:网络
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

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

精彩评论

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