6

I have an application targeting the .NET Framework 4.0. It builds and runs fine but I cannot get it to compile in Dotfuscator CE and they will not support it since it is CE. I am stuck.

Dotfuscator CE (v5.0.2500.0) with Visual Studio 2010 SP1. This is the Error:

Resolving method references...
External type not found System.Windows.Input.ICommand,PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
Build Error.

The problem seems to originate from Microsoft changing ICommand from PresentationCore.dll in NET 4.0 to System.dll in NET 4.5. Studio handles this and compiles fine as I am targeting NET 4.0.

Dotfuscator CE does not handle it and I am not sure how to correct the issue. Any help would be greatly appreciated.

4

1 回答 1

3
  1. 找到.NET4的PresentationCore.dll的路径,如C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0
  2. 在 Dotfuscator 的设置选项卡上 -> 用户定义的程序集加载路径;
  3. 将 PresentationCore.dll 的路径添加到路径列表并首先检查搜索。

希望它对你有用。

于 2015-06-23T06:20:35.250 回答