4

为了支持XP,我的其中一个项目现在针对.NET 4.0,并使用Microsoft.Bcl.Async作为.NET 4.5的异步功能。无法将Dotfuscator与Microsoft.Bcl.Async应用程序一起使用

问题是,我不再能够使用Dotfuscator(无论是专业版还是包含在VS 2012中的社区版)混淆得到的应用程序。

当试图运行可执行混淆的程序,出现以下错误崩溃:

Could not load type 'System.Object' from assembly 'System.Runtime, Version=2.5.19.0

这个错误似乎来自受Microsoft.Bcl.Async需要在app.config设置分别是:

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

似乎有人遇到了类似的问题,使用different obfuscation software这是由厂商修复。

有什么我可以做的,以解决这个问题?或者这是Dotfuscator的问题? (当然是公平的,所有的麻烦真的源于微软不能在XP支持.NET 4.5 ...)

+0

嗯......有趣。我不知道Bcl.Async库是以这种方式工作的。我必须尝试一下,看看我能否找到解决方法和/或在内部提交错误 – Earlz

+1

“我不再能够使用Dotfuscator混淆得到的应用程序”。您是否能够在Windows XP上运行生成的应用程序(而不是在装有.NET4.5/VS2012的机器上)而不进行混淆? –

+0

@Геннадий-Ванин - 是的,应用程序在混淆之前可以在XP和其他版本的Windows上正常工作,但是在混淆之后它不适用于任何机器。 –

回答

2

此问题已得到修复为Dotfuscator的版本4.10.2(今天发布):http://www.preemptive.com/support/dotfuscator-support/dotfuscator-pro-change-log/520

根本原因是由于框架的ilasm实用程序引起的问题: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

如果由于某些原因您无法更新,在安装了.NET 4.0的系统上运行模糊处理也应该足够。

相关问题