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);
精彩评论