question

AlexandrRybalko-7965 avatar image
0 Votes"
AlexandrRybalko-7965 asked AlexandrRybalko-7965 edited

Why is the package created with no certificate?

I have a WPF desktop bridge app and I use WindowsPowerShell to create a package to be published to the Microsoft Store. Recently I have run into a problem: if I change the version of Visual Studio in WindowsPowerShell script from 17th to 19th, the package will be created without the certificate which is defined in the .wapproj file(instead of using the valid one, a new certificate will be created and the package will be signed with it). This happens only when I use the 19th version of Visual Studio. I have looked through the logs of WindowsPowerShell, and there is no message saying that the certificate file had not been found.
Here is my powershell script:

$msbuild = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"
set-alias msbuild $msbuild

#set folder atrtributes
Get-ChildItem $ENV:WORKSPACE -Recurse | foreach {$_.Attributes = 'Normal'}


$proj_name_centennial = "C:\Users\alexa\source\Workspaces\myApp\Sources\myApp\myApp.Package\myApp.Package.wapproj"
$solution_dir="C:\Users\alexa\source\Workspaces\myApp\Sources\myApp"
$vs_config = "Release" 
$appx_packages_dir="AppxPackages\\"
$uap_appx_package_build_mode ="StoreUpload"
$appx_bundle="Never"

#RestoreNugetPackages
C:\Users\alexa\source\nuget.exe restore $proj_name


msbuild $proj_name_centennial /t:Build /p:Configuration=$vs_config /p:SolutionDir=$solution_dir/ /p:Platform=x64 /p:AppxPackageDir=$appx_packages_dir /p:UapAppxPackageBuildMode=$uap_appx_package_build_mode /p:AppxBundle=Never


What can be the reason of the certificate not being added to the package?

windows-wpf
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,@AlexandrRybalko-7965.This is not easy to determine if it is a problem with Visual Studio 2019.You could report it in the link: https://developercommunity.visualstudio.com/home.

0 Votes 0 ·

0 Answers