MicrosoftDocs / edge-developer

Developer documentation for Edge.
https://learn.microsoft.com/microsoft-edge/developer/
Creative Commons Attribution 4.0 International
384 stars 513 forks source link

Update documentation to be clear that native extensions cannot be developed using UWP / WinUI3 #3191

Open minfrin opened 5 months ago

minfrin commented 5 months ago

The docs contain the following text:

 The app installer must create a registry key and set the default value of the key to the full path of the native messaging host manifest file.

This registry update step is impossible from an MSIX package, because of the sandboxed nature of MSIX apps. In turn, this means that neither WinUI3 nor UWP can be used to develop native web extensions, because both require MSIX.

The docs need to be updated to clearly state which Windows technologies are compatible, so that you don't end up wasting ages doing down development dead ends.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

AB#51711492

captainbrosset commented 5 months ago

Thank you for filing, and sorry that you're experiecing this confusion and time lost. I'm not personally knowledgeable in this area, but I've asked other people on the team and we will update the docs based on this as soon as I know more. In the meantime, I would suggest referring to the Windows app developer documentation for help on updating the registry on install. It seems like this article might help., if you're able to use the Windows Installer: https://learn.microsoft.com/en-us/windows/win32/msi/modifying-the-registry

minfrin commented 4 months ago

In the meantime, I would suggest referring to the Windows app developer documentation for help on updating the registry on install. It seems like this article might help., if you're able to use the Windows Installer: https://learn.microsoft.com/en-us/windows/win32/msi/modifying-the-registry

Unfortunately the link above is for the obsolete MSI installer, which has been replaced by MSIX.

To clarify, the docs need to describe a workable path from:

Right now this appears impossible as MSIX (note the X - not the same as MSI) sandboxes applications (a good thing) and in so doing makes it impossible for Edge and a native extension from seeing each other.

The docs either need to explicitly state that WinUI+MSIX can be used to make extensions, or explicitly state that WinUI3/MSIX cannot be used to make extensions.

Right now the docs say nothing, leaving you investing tonnes of time making a WinUI3 app, only to discover it's impossible to deploy it.