The compiler version is not upgrade when using CSharpCodeProvider to compile code into DLLs.

I am using CSharpCodeProvider to compile my script into DLL, to speed up the compile time.
But I met a problem, the Unity5.3 upgrade the compiler and the foreach will not have GC Alloc problem anymore.
The dll I using CSharpCodeProvider to compile, however, it has GC Alloc when using foreach.

So what I met is in the source code version, there is no GC Alloc, but in DLL version, it has GC Alloc when I using foreach.

So how can I use the new compile to build my DLL?

I am specify the compiler version, but the result is still the same:

var providerOptions = new Dictionary<string, string>();
providerOptions.Add("CompilerVersion", "v4.0");
using (var provider = new CSharpCodeProvider(providerOptions)) { ... }

Is anybody know this issue?

I add a new feedback at:
https://feedback.unity3d.com/suggestions/foreach-is-still-make-gc-alloc-when-i-build-the-script-into-dll-using-csharpcodeprovider

I don’t know if anybody met the same problem.