How to sign Console App inside Windows Application Packaging Project

Vladyslav Tereschuk 0 Reputation points
2024-04-01T08:56:25.7966667+00:00

I have a Windows Application Packaging Project that contains UWP and Console App. UWP app is set as entry point and in defined condition it starts Console App with FullTrustProcessLauncher. When this happens - Console requests admin rights and user receives default Windows UAC prompt. This prompt has field "Publisher" and I need to sign the Console App itself to pass there our company name.


The problem is that UWP and Packaging project have Package.appxmanifest that works greatly with .pfx certificate, but ConsoleApp has only "Strong naming" property in project properties that fails every time I try to pass there our certificate. Build fails with "MSB3325: Cannot import the following key file" error, i've tried to solve it with help of this article, but it shows that in older .NET projects my certificate should appear in the dropdown, but I have a newer .NET project that doesn't provide any dropdown for this field so I can only pass there path to .pfx file. Any ideas about how can I solve this problem? ThanksScreenshot

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,842 questions
Universal Windows Platform (UWP)
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.