Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dotfuscator CE Build Error: External type not found System.Windows.Input.ICommand,PresentationCore

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.

like image 627
Kerfluffel Avatar asked Jan 03 '14 16:01

Kerfluffel


1 Answers

  1. Find the path of .NET4's PresentationCore.dll, such as C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0
  2. On Dotfuscator's setting tab -> User Defined Assembly Load Path;
  3. Add PresentationCore.dll's path to the path list and check the Search first.

Hope it work for you.

like image 161
Jun Avatar answered Sep 28 '22 09:09

Jun