microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.49k stars 2.61k forks source link

Signing a UWP Application using either VSBuild or MSBuild not working as expected #14732

Closed luEbe closed 3 years ago

luEbe commented 3 years ago

Required Information

Bug Type: Signing a UWP application.

Enter Task Name: MSBuildV1 / VSBuildV1

Environment

Issue Description

We used the VSBuild task to build a UWP application and sign it with a certificate that was uploaded to the Secure Files Storage on Azure and then loaded into the certificate store using a Script utilizing the PowerShellV2 Task. The build is successful but the application is not signed with that certificate, rather it seems like, it is just using the information given in the appxmanifest file to create a self-signed certificate. After some attempts we replaced the VSBuild with MSBuild, how ever again to no avail. When we tried to install the application using the generated msixbundle, it says that this application is not trustworthy.

We also tried explicitly using the VSBuild Task Version that was used in the last successful build, which did not solve the problem either.

That being said, we tried with the same certificate and local msbuild on the local machine and everything worked properly and as expected.

PS: We have always been using the same approach to sign our UWP Application with Azure Pipelines and it used to work fine. The last successful build we had was on 25. of February and the first one failing happened on 31. of March. There were no significant code changes in between those builds and we even tried reverting them.

EzzhevNikita commented 3 years ago

Hi @luEbe, it looks like it is not an issue with tasks themselves (since you have said that you have tried to use the previous task version and that didn't help to resolve the issue), I think the problem is mostly coming from the changed Visual Studio and MSBuild version on the virtual images that agents are using. I suggest you create the ticket in this repo - https://github.com/actions/virtual-environments/issues. This is the team that is responsible for virtual images.

luEbe commented 3 years ago

Ok, I created an issue there https://github.com/actions/virtual-environments/issues/3183

Thanks @EzzhevNikita