We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c5c710 commit 83d8d0fCopy full SHA for 83d8d0f
src/mpu/SerializerTargetCompiler.cs
@@ -137,6 +137,15 @@ ColorizedTextWriter errorWriter
137
compilerParameters.ReferencedAssemblies.Add( referenceAssembly );
138
}
139
140
+ if (
141
+ !typeof( CodeDomProvider ).Assembly.CodeBase.StartsWith(
142
+ Environment.ExpandEnvironmentVariables( "file:///%SystemDrive%/Windows/" ),
143
+ StringComparison.OrdinalIgnoreCase ) )
144
+ {
145
+ // may be mcs, so add C# 3.5 option.
146
+ compilerParameters.CompilerOptions = "-langversion=3 -sdk=2";
147
+ }
148
+
149
var results =
150
CodeDomProvider.CreateProvider( "C#" ).CompileAssemblyFromFile(
151
compilerParameters,
0 commit comments