Thank you for reaching out.
Here’s steps to fix trust issues when publishing an XBAP application in a test environment:
Step 1: Create a Self-Signed Certificate
Open PowerShell as Administrator and run:
New-SelfSignedCertificate -Type CodeSigningCert -Subject "CN=TestXBAPCert" -CertStoreLocation "Cert:\LocalMachine\My"
Then export the certificate:
- Run
certlm.msc
- Go to Personal > Certificates
- Find
TestXBAPCert
- Right-click → All Tasks → Export
- Choose Yes, export the private key
- Save as
TestCert.pfx
with a password
Step 2: Sign Your XBAP Project in Visual Studio
- Right-click your XBAP project → Properties
- Go to the Signing tab
- Check Sign the ClickOnce manifests
- Browse and select
TestCert.pfx
- Enter the password
- Publish the project
Step 3: Trust the Certificate on Test Machines
- Copy
TestCert.pfx
to the test machine - Double-click the file to start the import wizard
- Choose Local Machine
- Import into:
- Trusted Root Certification Authorities
- Trusted Publishers
- Complete the wizard and accept any warnings
Once done, your XBAP will be signed and trusted, and it will run with full trust in the test environment without security warnings.
Let me know if you want any further help with these steps.