Description
Description
Customer is reporting an issue with ClickOnce publishing in VS. They have a code signing certificate from Sectigo on a hardware key.
On x64 VS 2022 .NET FX project (Console/Forms/WPF), Properties -> Sign -> Select Certificate from Store shows the new certificate and it can be selected for code signing.
On ARM64 VS 2022 .NET FX project, same steps don't show the Sectigo certificate.
I asked customer to run the following snippet in a console project on ARM64 and check if the certificate is displayed. Customer confirmed it did not.
var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
personalStore.Open(OpenFlags.OpenExistingOnly);
var certs = personalStore.Certificates;
X509Certificate2UI.SelectFromCollection(certs, "Certificates", "Select", X509SelectionFlag.SingleSelection);
ClickOnce retrieves certificates that can be used for code signing with the above code and then filters the list for certs that have a private key and can be used for code signing.
More details in this f/b ticket:
https://developercommunity.visualstudio.com/t/Certificates-Store-in-Visual-Studio-Arm/10577088
Reproduction Steps
var personalStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
personalStore.Open(OpenFlags.OpenExistingOnly);
var certs = personalStore.Certificates;
X509Certificate2UI.SelectFromCollection(certs, "Certificates", "Select", X509SelectionFlag.SingleSelection);
Run above code in a .NET FX Console project on ARM64 OS with a certificate on a h/w key.
Expected behavior
The expectation is that ARM64 OS behaves identical to x64 VS when retrieving certicates from Personal Store.
Actual behavior
Certificates on hardware key are not displayed.
Regression?
No
Known Workarounds
None
Configuration
ARM64 VS 2022 on ARM64 Windows
Other information
No response