Home:ALL Converter>Signing Edge WebExtension and UWP app in Visual Studio

Signing Edge WebExtension and UWP app in Visual Studio

Ask Time:2019-03-08T22:50:59         Author:Ronquam

Json Formatter

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!

Author:Ronquam,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/55065680/signing-edge-webextension-and-uwp-app-in-visual-studio
Deepak-MSFT :

How to sign an assembly in Visual Studio\n\nYou sign an application or component by using the Signing tab of the project properties window (right-click the project node in Solution Explorer and select Properties, or type project properties in the Quick Launch window, or press Alt+Enter inside Solution Explorer). Select the Signing tab, then select the Sign the assembly check box.\n\nSpecify a key file. If you choose to create a new key file, new key files are always created in the .pfx format. You need a name and password for the new file.\n\n\n Warning\n \n You should always protect your key file with a password to prevent\n someone else from using it. You can also secure your keys by using\n providers or certificate stores.\n\n\nYou can also point to a key you have already created. For more information about creating keys, see Create a public-private key pair.\n\nIf you only have access to a public key, you can use delay-signing to defer assigning the key. You enable delay signing by selecting the Delay sign only check box. A delay-signed project doesn't run, and you can't debug it. However, you can skip verification during development by using the Sn.exe strong name tool with the -Vr option.\n\nReference:\n\nHow to sign an assembly in Visual Studio",
2019-03-11T06:50:37
yy