To support XP one of my projects is now targeting the .NET 4.0 and using Microsoft.Bcl.Async for the async features of .NET 4.5.
The trouble is, I am not longer able to obfuscate the resulting application using Dotfuscator (either with the professional version or the community edition included with VS 2012).
When trying to run the obfuscated executable the program crashes with the following error:
Could not load type 'System.Object' from assembly 'System.Runtime, Version=2.5.19.0
That error seems to come from the app.config settings needed by Microsoft.Bcl.Async which are:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.5.19.0" newVersion="2.5.19.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
It seems someone else ran into a similar issue using different obfuscation software which was fixed by the vender.
Is there something I can do to fix this? Or this an issue with Dotfuscator? (Well to be fair, all the trouble really stems from Microsoft not supporting .NET 4.5 on XP...)