dotnet / dotnet/msbuild

ResolveKeySource fails when manifest signing is configured but disabled (and would fail)

Open
#3,348 3 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

Copied from internal bug https://devdiv.visualstudio.com/DevDiv/_workitems/edit/620487.

### Steps to reproduce

1. Start Visual Studio 2015, and create new WinForm project.
2. Select [signing] tab in project’s property.
3. Check [Sign the assembly], and choose [Choose the strong name key file] combo box as []
4. Input password on [Create strong name key] dialog, and click [OK] button.
5. Check [Sign the ClickOnce manifest], and click [Select from File…] button, and choose the pfx file which is created by step 4.
6. Check off [Sign the ClickOnce manifest].
7. Start certmgr.msc, and delete certificate registered by step 4 from personal certificates store.
8. Build project

### Expected behavior

Build succeeds, and does not sign the ClickOnce manifest.

### Actual behavior

Severity | Code | Description | Project | File | Line | Suppression State
-- | -- | -- | -- | -- | -- | --
Error |   | Cannot import the following key file: test.pfx. The key file may be password protected. To correct this, try to import the certificate again or import the certificate manually into the current user’s personal certificate store. | WindowsFormsApp20 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets | 3156 |  
Error |   | Importing key file "test.pfx" was canceled. | WindowsFormsApp20 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets | 3156 |  
Warning |   | Unable to find code signing certificate in the current user’s Windows certificate store. To correct this, either disable signing of the ClickOnce manifest or install the certificate into the certificate store. | WindowsFormsApp20 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets | 3156 |  

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.