How to resolve this DAC error [cannot set "Executable”, because only string can set XmlNode attribute]

When application folder contains “App.Publish“ folder [ClickOnce output folder], and run the Desktop Application Convert with similar command:

DesktopAppConverter.exe -Installer c:\release\output -Destination c:\result -PackageName “yourapp” -Publisher “CN=xxxxxxx-xxxx-xxxx-xx-xxxxxxxxxxx” -Version -appid “yourapp” -makeappx -AppExecutable “yourapp.exe” -packagearch x86

you will meet this kind of error in the DAC log:

[2017-08-16T16:21:26] An error occurred converting your application. Here is the full error record:


PowerShell Error Record:

[cannot set “Executable”, because only string can set XmlNode attribute]

無法設定 “Executable”,因為只能使用字串值設定 XmlNode 屬性。

PowerShell Stack Trace:

位於 SetExecutable,C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.0.2.0_x64__8wekyb3d8bbwe\manifest\Manifest.ps1: Line 517

To solve this, please remove the “App.Publish“ folder, which contains the executable exe and confused DAC.




How to enable bridge desktop Unity App (lower .Net version app) with latest IAP APIs for Windows Store

1. Create C# class library and follow this link to create purchase method:

here is the sample code:

public static string PurchaseAddon (…..)



static async void purchase(object o)
     IInitializeWithWindow initWindow = (IInitializeWithWindow)(object)storeContext;
     var ptr = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle;
     var result = await storeContext.RequestPurchaseAsync((o as PurchaseObject).Productid);
     if (result.ExtendedError != null)
        MessageBox.Show( result.ExtendedError.Message,result.ExtendedError.HResult.ToString());
      switch (result.Status)

2. Install DLLExport nuget, and claim [DllExport] in the C# project:


3. In Unity script, import the above library:

    extern static IntPtr PurchaseAddon (….);

4. Exactly follow below five steps to test IAP:

Important: The RequestPurchaseAsync must be raised from UI thread, refer to




Get Rid of “The image file <> must be smaller than 204800 bytes.” from WACK Report

When using Desktop Converter to auto produce APPX package, you may notice even the image file’s size is small enough in your app packagefiles folder, however the output APPX is still failed on WACK checking on image file size part.

To solve this:

1. Get latest Windows 10 SDK, run this command to manually package the app:

D:\Projects\myapp>”C:\Program Files (x86)\Windows Kits\10\bin\x86\makeappx.exe” pack /d .\packagefiles /p myapp.appx /l

2. Run below powershell scripts to sign myapp.appx manually as well (this is for your local installation and test purpose):

cd “C:\Program Files (x86)\Windows Kits\10\bin\x86”

.\MakeCert.exe -r -h 0 -n “CN=B1XXXXXX-990F-467C-B5C2-XXXXXXA0BDFA” -eku -pe -sv d:\output\3d.pvk d:\output\3d.cer

.\pvk2pfx.exe -pvk d:\output\3d.pvk -spc d:\output\3d.cer -pfx d:\output\3d.pfx

.\signtool.exe sign -a -f d:\Output\3d.pfx -fd SHA256 -v D:\test\myapp.appx

3. Now run appcertui.exe to check the myapp.appx again:

Run “C:\Program Files (x86)\Windows Kits\10\App Certification Kit\appcertui.exe”, Select Store App (it will create a report,but need you set the output path everytime), make sure the report shows PASS result:





Build Assembly-UnityScript.dll as Release version in Unity

To solve the assembly-unityscript.dll debug version issue in Unity 5.6.1f1 (you may find this cannot be changed from Unity UI Settings), please follow below steps:

1. The Assembly-UnityScript.dll is generated when using .JS as scripts, if the project doesn’t need, remove the .JS files should avoid generating Assembly-UnityScript.dll.

2. If the .JS scripts are required in the App, can refer to below steps to get a release version of Assembly-UnityScript.dll:

a. In Unity project,open temp folder,can see some file names starting with unitytemp-。Open some latest files one by one, you will see some file has below content, fo example, in this sample, I saw below strings in Temp/UnityTempFile-23f957311d4e8c441a046557e457d203:








1. Remove the  -debug line and save it.

2. Open CMD, go to the project folder, run below command:

“D:\Program Files\Unity\Editor\Data\Mono\bin\mono.exe” “D:\Program Files\Unity\Editor\Data\Mono\lib\mono\2.0\us.exe”  @Temp/UnityTempFile-23f957311d4e8c441a046557e457d203

It will generate /Assembly-UnityScript.dll with release version:

Successfully compiled ‘1’ file(s) to ‘D:\Projects\Hololens\DesktopObj\Temp\Assembly-UnityScript.dll’.

Then you can use it to replace the debug version.




How to Monetize Desktop Bridge App with Windows Store

1. Enable UWP API support in Converted App:

a. If the payment project is above .NET 4.6.1:

Announcing “UWPDesktop” NuGet Package Version 14393

  1. b. If the payment project is lower than .NET 4.6.1, or C++, or VB, create a UWP Wrapper, and call interop functions created in the UWP Wrapper. Refer to:

2. Call UWP API to implement the monetize logic in the payment project:


使用桌面桥的 Windows 桌面应用程序必须执行额外步骤来配置 StoreContext 对象,然后才可以使用此对象。 有关详情,请参阅本部分

来自 <>

Sample code:




How to correct Publisher ID and package the converted app

Install Win 10 SDK if you don’t have:

Latest version:

Anniversary version: 


In the AppxManifest.xml file of your converted application you will find an entry similar to the following one:

<Identity Name=”myApp”



Version=”″ />

The value of the Publisher attribute should match the publisher id (CN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx) of the Store account of your dev center:, for example.


After modifying the appxmanifest.xml, please use the makeappx.exe to package the application again:

C:\Program Files (x86)\Windows Kits\10\bin\x86>makeappx pack /d “C:\myapp\PackageFiles” /p c:\Output\myapp.appx




How to check if Centennial App is ready

Install latest Win 10 SDK if you don’t have (till 2017 April, its version is 15063), Windows 10 should be the matched version:

Run command:

C:\Program Files (x86)\Windows Kits\10\App Certification Kit>appcert test -appxpackagepath C:\Projects\app.appx -reportoutputpath C:\Output\MyReport.xml

The MyReport.xml contains test result and you can follow it to fix known issues. Digitally signed file test, File association verbs, Debug configuration test are optional.

For more details, refer to:




How to create certificate, sign APPX package and install certificate on Win 10

Install Win 10 SDK if you don’t have:

Latest version:

Anniversary version: 


1. Create Certificate:

C:\Program Files (x86)\Windows Kits\10\bin\x86>MakeCert.exe -r -h 0 -n “CN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” -eku -pe -sv c:\output\my.pvk c:\output\my.cer

C:\Program Files (x86)\Windows Kits\10\bin\x86>pvk2pfx.exe -pvk c:\output\my.pvk -spc c:\output\my.cer -pfx c:\output\my.pfx

2. Sign certificate on APPX:

C:\Program Files (x86)\Windows Kits\10\bin\x86>signtool.exe sign -a -f C:\Output\my.pfx -fd SHA256 -v C:\app\app.appx

3. Double click my.cer, install Certificate to local trusted root:

clip_image001clip_image002 clip_image003





How to capture crash dump for Desktop Bridge Converted or UWP app

Here is the guide on how to capture crash dump for UWP and Desktop Bridge Converted Apps:

1. Install Windows SDK which includes Windows Debugger (by clicking Install SDK)




2. Only select Debugging Tools for Windows to finish install.



3. Open Powershell Command, run this command to get your application ID:

Get-appxpackage | select-string WPFUWP

For example, I go the result: WPFUWP_1.0.0.1_x86__s46g25shpckvj for my App WPFUWP.

4. Based on your app bit, open Command Window, use 32bit (x86) folder or 64bit (x64) folder of Windows Debugger, run this command (my wpfuwp is 32bit app, so I choose Debuggers\X86) to enable debugging tool for my App:

“C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\plmdebug.exe” /enableDebug WPFUWP_1.0.0.1_x86__s46g25shpckvj “C:\Program Files (x86)\Windows Kits\10\Debuggers\x86\WinDbg.exe -c g”

5. Launch the App and recreate the crash issue. The Windbg will auto-break the crash point, and stop App running or existing.

6. Open Windbg, in the command line, run this command:

.dump /ma /u c:\output\crash.dmp

Then can start check the crash.dmp as postmortem analysis by debugging expert.

After getting dump, can run this command to auto attach debugger on my app:

plmdebug /disableDebug WPFUWP_1.0.0.1_x86__s46g25shpckvj