We have an app made in C# UWP. I am trying to add cicd into our infrastructure so we can run automated tests using gitlab.
We have a gitlab runner set up using the default system profile which will run power shell. We have 2 steps, build the app and then run the unit tests. I use msbuild to build the solution which generates the .appxrecipe for our unit test project. I then get the script to call vstest.console.exe passing in the path to the .appxrecipe but when it runs i get an issue:

I have tried running the gitlab runner under a user account with admin privileges but that seems to make things worse and then we cannot build anymore because of lack of privileges.
If i go to this path i can manually install the appx but this does little good as it is uninstalled on another run and must be installed again.
Just to mention that running the script manually while on the machine works just fine, this is only a problem when running on the gitlab runner.
I really dont know why its complaining about this nor how to make it have the privileges it needs. Been stuck on this for a few days and cant find anyone with similar problems online.