Cannot use Dotfuscator with an application linking to Microsoft.Bcl.Async

To support XP, one of my projects now targets .NET 4.0 and uses Microsoft.Bcl.Async for the asynchronous features of .NET 4.5.

The problem is that I can no longer confuse the resulting application with Dotfuscator (either with the professional version or with the community edition included in VS 2012).

When you try to run a running executable file, the program crashes with the following error:

Failed to load type 'System.Object' from assembly 'System.Runtime, Version = 2.5.19.0

This error seems to come from the app.config settings required by Microsoft.Bcl.Async, which:

<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> 

Someone else seems to have encountered a similar problem using other obfuscation software that has been fixed by the vendor.

Is there something I can do to fix this? Or is this a problem with dotfuscator? (To be fair, all the problems are really related to the fact that Microsoft does not support .NET 4.5 on XP ...)

+4
source share
1 answer

This issue has been fixed since Dotfuscator version 4.10.2 (released today): http://www.preemptive.com/support/dotfuscator-support/dotfuscator-pro-change-log/520

The main reason was related to the problem of the ifram framework utility: https://connect.microsoft.com/VisualStudio/feedback/details/801891/ilasm-incorrectly-updates-references-from-mscorlib-to-system-runtime-for-certain- types-when-system-runtime-is-included

If for some reason you cannot update, running obfuscation on a system with ONLY .NET 4.0 installed should also be sufficient.

+2
source

Source: https://habr.com/ru/post/1481278/


All Articles