Want more features on Pastebin? Sign Up, it's FREE!
Guest

Compiling with CodeDomProvider doesn't allow new features of C# or VB

By: a guest on Feb 27th, 2012  |  syntax: None  |  size: 0.89 KB  |  views: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. var csc = new CSharpCodeProvider(new Dictionary<string, string>() { { "CompilerVersion", "v3.5" } });
  2.        
  3. <system.codedom>
  4.   <compilers>
  5.     <compiler
  6.       language="vb;vbs;visualbasic;vbscript"
  7.       extension=".vb"
  8.       type="Microsoft.VisualBasic.VBCodeProvider, System,
  9.         Version=2.0.3600.0, Culture=neutral,
  10.         PublicKeyToken=b77a5c561934e089"
  11.       compilerOptions="/optimize"
  12.       warningLevel="1" >
  13.       <providerOption
  14.         name="CompilerVersion"
  15.         value="v3.5" />
  16.     </compiler>
  17.     <compiler
  18.       language="c#;cs;csharp"
  19.       extension=".cs"
  20.       type="Microsoft.CSharp.CSharpCodeProvider, System,
  21.         Version=2.0.3600.0, Culture=neutral,
  22.         PublicKeyToken=b77a5c561934e089"
  23.       compilerOptions="/optimize"
  24.       warningLevel="1" >
  25.       <providerOption
  26.         name="CompilerVersion"
  27.         value="v3.5" />
  28.     </compiler>
  29.   </compilers>
  30. </system.codedom>
clone this paste RAW Paste Data