Showing posts with label UWP. Show all posts
Showing posts with label UWP. Show all posts

Saturday, February 29, 2020

How to extend or create a new a cer certificate for package signing or re-signing UWP for sideloading?

How to extend or create a new a cer certificate for package signing or re-signing UWP  for sideloading?

How-I-fixed-it?
  1.  Lookup the CN (Publisher Name) from the old certificate (the new one needs to have the same CN) 
  2. Command window in current dirctory of the appx
  3. 1. Create a new certificate to self-sign you UWP app using the MakeCert in the Windows Kits SDK, e.g. "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\MakeCert" /n CN=YOUR_PUBLISHER_NAME  /r /h 0 /eku "1.3.6.1.5.5.7.3.3,1.3.6.1.4.1.311.10.3.13" /e "12/31/2100" /sv Test.pvk Test.cer
  4. Convert the certificate to pfx format (using the password you entered when promted by the signtool), e.g. "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\Pvk2Pfx" /pvk  Test.pvk /pi "pwd" /spc Test.cer /pfx Test.pfx /po "pwd"
  5. Sign the appx, e.g. "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\SignTool.exe" sign /fd sha256 /f "Test.pfx" /p pwd "FULL_PATH_TO_MY.appx"

Found the solution here:
https://blogs.msdn.microsoft.com/wsdevsol/2014/02/12/create-a-windows-store-appx-package-and-sign-it/

Monday, April 15, 2019

Visual Studio UWP Deployment Error DEP0700 because of staged packages

Developing UWP apps with Visual Studio  I sometimes run into a problem to debug/deploy the app on the local machine getting the error code DEP0700.

One reason I found out causing this are "staged" packages. This happens, if the same app package is installed by another user account or installed from Visual Studio but reset from Windows App Settings.

How-I-fixed-It:

1. Get psexec tool from https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
2. Run psexec -s powershell -c "get-appxpackage | remove-appxpackage" within a admin commandline box

I found the information here:
https://stackoverflow.com/questions/13865930/how-to-uninstall-an-app-that-another-user-installed