Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get UWP Store associations using PowerShell or MSBuild

I'm using AppVeyor CI to build my UWP app and want to create an APPX package during every build. However my .gitignore is ignoring the Package.StoreAssociation.xml and MyAppName_StoreKey.pfx which I want to include in the APPX package as they are identifying my app in Windows Store.

Is there any way to get these files using PowerShell or MSBuild or something like that? In other words, is there any command line equivalent to the Project > Store > Associate App with the Store... wizard?

I know I can upload these files to the repo as Secure files but I'd prefer getting the latest files from the Dev Center with every build.

like image 273
Marian Dolinský Avatar asked Apr 05 '17 18:04

Marian Dolinský


2 Answers

I would say probably not, as the Associate App with the Store Wizard, is an authenticated Wizard which requires a users Microsoft Account to be registered with Visual Studio, Load Credentials from storage or asking for OAuth, and then Visual Studio goes to Microsoft's server to Sign the Certificate and Sign the app with it.

AppVeyor documentation says the currently UWP is not officially supported for UWP, as a Microsoft License is required.

Edit: Does this help?

like image 104
William Bradley Avatar answered Oct 27 '22 06:10

William Bradley


Is there any way to get these files using PowerShell or MSBuild or something like that? In other words, is there any command line equivalent to the Project > Store > Associate App with the Store... wizard?

No, as @William's explanation. The associating operation needs user's interaction in Visual Studio, this doesn't depend on a public command/API.

In my experience, we need to store(maintain) the latest store association information in somewhere, overwrite the related files and replace the reserved keywords in the app's manifest template file before packaging.

like image 20
Franklin Chen - MSFT Avatar answered Oct 27 '22 05:10

Franklin Chen - MSFT