2
votes

I have a Xamarin Forms app that I have integrated Dotfuscator CE successfully with both Android and iOS. Now I am trying integrate with UWP but get a build error when Dotfuscator runs. I turned on the more verbose output and see this:

[Build Output] Couldn't load external type because its assembly can't be found: Windows.UI.Xaml.Controls.Page,Windows.Foundation.UniversalApiContract, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null

I followed the same directions I used for Android and iOS and updated both Dotfuscator CE (5.40.0.8950) and Visual Studio Community 2017 (15.9.5). Any ideas? Is protecting UWP not possible with Dotfuscator CE?

1

1 Answers

2
votes

You may need to tell Dotfuscator where to find the UniversalApiContract if the location changed since earlier SDK versions. I found mine here, your path may differ depending on which version you have:

C:\Program Files (x86)\Windows Kits\10\References\10.0.17763.0\Windows.Foundation.UniversalApiContract\7.0.0.0

To tell Dotfuscator Community to look in this additional directory:

  1. Launch the Dotfuscator Config Editor (GUI) from Visual Studio by selecting Tools > PreEmptive Protection - Dotfuscator Community.
  2. Open the DotfuscatorConfig.xml file for your UWP project.
  3. Under Settings > Assembly Load Paths, click the green plus icon to add a path, paste the path to the directory, and click OK.
  4. Save the config file.

Afterward, try building the project from Visual Studio again.

(Note: I work for the Dotfuscator team and am answering as part of my job.)