none
Appxbundle is not signed with valid *.pfx in /p:UapAppxPackageBuildMode=StoreUpload mode RRS feed

  • Question

  • Good day!

    I build an application using msbuild.exe. A month ago I switched from vs2017 to vs2019 and got some troubles.

    If I build with /p:UapAppxPackageBuildMode=StoreUpload the appxbundle stays unsigned. I did extract *.appxupload content and check with:

    signtool.exe verify /v myapp.appxbundle

    It says: "SignTool Error: No signature found". Also when i try to install the appxbundle i get warning that application is untrusted.

    At the same time if I switch build mode to  /p:UapAppxPackageBuildMode=SideloadOnly i get appxbundle which is signed OK. I do same signtool.exe verify and result is OK. Also when i try to install - it says that app is trusted. 

    This happened after switch to VS2019. Can anyone help me to make things clear?

    Thursday, February 6, 2020 3:18 PM

All replies

  • Hi,

    Could you please share which document that you are following to package your app? And why you want to use MSBuild.exe to package the app directly? 

    Generally, for packaging UWP apps, we could package it via Visual Studio or MakeApp x.exe. Here are the documents for packaging UWP apps: Package an MSIX app with Visual Studio and Manual app packaging.

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Friday, February 7, 2020 2:02 AM
  • We use MSBuild.exe because we have automated remote system that make builds via building scripts. Mainly we interested in manual solutions. 


    docs.microsoft.com/en-us/windows/uwp/packaging/auto-build-package-uwp-apps says:

    If you want to build your solution by using the command line, or by using any other build system, run MSBuild with these arguments (...).

    If I pass /p:UapAppxPackageBuildMode=StoreUpload - internal appxbundle is not signed.

    At the same time if I pass  /p:UapAppxPackageBuildMode=SideloadOnly - appxbundle is signed.

    The provided variants do not fully satisfy our goals. As documentation says MakeAppX.exe does not produce package upload file. Also we don't use user interfaces.

    Also this all works pretty fine before we update. How happened that app is signed while create appxbundle and is not signed if the same build packed into appxupload?

    If it is expected behaviour?

    P.S. Do i need to sign an application for Store distribution at all? Docs says: If you're publishing your app in Microsoft Store, your app will be signed with a trusted certificate for you. What does that mean? If I submit not-signed build to Microsoft Store, will it be signed automaticaly? Will users be warned like "app is untrusted/unsigned"?

    P.P.S.

    I have just revert back to VS2017 on local machine and all work fine again.

    The command is as simple as that:

    MSBuild.exe myapp.sln /t:app /p:Configuration=Release /v:n /p:Platform=x86 /p:AppxBundle=Always /p:AppxSymbolPackageEnabled=true /p:UapAppxPackageBuildMode=StoreUpload /p:AppxBundlePlatforms="x64|x86" /p:PlatformToolset=v141

    My *.vcproj file contains info about *.pfx key. 

    VS2017 generates myapp.appxupload file. After i unpack it and run myapp.appxbundle - it installs OK(trusted up). Also i checked it with signtool - all is ok.

    I run the same command line (except for toolset v142) in VS2019 dev console: got myapp.appxupload file. After i unpack it and run myapp.appxbundle - it fails to install (Ask the app developer for a new app package. This one isn't signed with a trusted certificate (0x800B0100)). Also i checked it with signtool - it is not signed.

    Friday, February 7, 2020 9:19 AM
  • Hi,

    Glad to hear that you find a workaround about this. Could you please send a feedback in the Visual Studio reporting this strange behavior? Looks like it is more related to with the build tool in the Visual Studio.

    Best regards,

    Roy


    "Developing Universal Windows apps" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Developing Universal Windows apps" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Monday, February 10, 2020 2:10 AM