I am developing a WebExtension for Edge. I implemented the example from https://learn.microsoft.com/en-us/windows/uwp/launch-resume/how-to-create-and-consume-an-app-service and it is working. Creating and signing a standalone WebExtension worked and the resulting .appx
installs the extension without problems. But now I need an AppServiceProvider for enabling native messaging. I want to build an .appx
file that installs both the extension and the AppServiceProvider.
I added an own Chrome WebExtenion into a folder Extension
under the AppServiceProvider project and adjusted it, so that a communication should work according to the documentation. I tried to install the WebExtension in Edge and the AppServiceProvider by double-clicking the resulting AppServiceProvider_1.0.0.0_x86_Debug.appx
, which includes both. But I get an error message that I either must install a new certificate for this app packet or need a new app packet with trusted certificates. I created a self-signed certificate for testing purposes by following the instructions from https://learn.microsoft.com/en-us/windows/desktop/appxpkg/how-to-create-a-package-signing-certificate and added it to TrustedPeople certificate storage. For a standalone WebExtension this worked, but how does the signing process work in Visual Studio?
Where have my .pfx
file to be included in Visual Studio?
Are there other things that I have to consider?
Any help will be appreciated, thanks!
By double-clicking Package.appxmanifest
in the AppServiceProvider project, a menu with serveral categories opens. In the Packaging
category click the Choose Certificate...
button next to the publisher field and choose the .pfx file.
The appx package, created via Create App Packages
wizard, will be signed with the private key configured before.
The app manifest publisher name must exactly match the subject name of the signing.
The appx can be installed via double-click and is working. But the WebExtension will not be installed in Edge.
References: