dotfuscator使用报错,混淆无法执行

具体报错信息如下,Could not find a compatible version of ildasm to run on assembly H:\Production\DBC.Ors.UI.Web.Mvc.ERP\bin\DBC.Core.dll. This assembly was originally built with .NET Framework v4.0.30319.
看到这个报错,我和小伙伴们都惊呆了,怎么办?

在混淆的时候报错了,错误描述大致如下:

Could not find a compatible version of ildasm to run on assembly C:\xxx.dll This assembly was originally built with .NET Framework v4.0.30319

要混淆不同的.Net Framework版本需要在Settings,Project Properties,添加配置如下。

其中ILASM和ILDASM后面必需要加上对应版本的版本号,然后文件引用对应的版本文件即可。

ILASM_v4.0.30319
C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe

ILDASM_v4.0.30319

C:\Program Files\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\ildasm.exe