Does anyone meet this error while using DesktopAppConverter to convert win32 to uwp?

392 Views Asked by At

I followed this https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-run-desktop-app-converter to package an application that doesn't have an installer. But it always prompts the following error:

C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.4.0_x64__8wekyb3d8bbwe\DesktopAppConverter.ps1 :
Exception calling "Compile" with "0" argument(s): "Reference to undeclared attribute group
'http://schemas.microsoft.com/appx/manifest/preview/windows10/msixappcompatsupport:PreviewEntryPointAttributesGroup'."

I don't know where does it "Reference to undeclared attribute group"

and sry for my bad English:(

1

There are 1 best solutions below

0
Anthony. On

I found a solution to this problem which involves modifying the DesktopAppConverter tool itself.

To do this you need to change the owner of the C:\Program Files\WindowsApps folder from SYSTEM to your user account (See https://consumer.huawei.com/en/support/content/en-us00688470/), and then open the folder "C:\Program Files\WindowsApps\Microsoft.DesktopAppConverter_2.1.4.0_x64__8wekyb3d8bbwe\converter_util" and change Line 196 of ManifestOps.ps1 from

$manifest = [AppxManifest]::new($ManifestDir, $schemaPath)

to

 $manifest = [AppxManifest]::new($ManifestDir, $installedSchemaPath)

After making this change, the DesktopAppConverter worked for me and produced a valid .appx file as output.

Remember to change the owner of the WindowsApps folder back to SYSTEM when you're done.