Cryptographic failure while signing assembly

category: [ Visual Studio ] tags: [ Requires Admin ] [ Tips ] [ Visual Studio ]
created: 03 Jan 2014 @ 11:13 modified: 24 Apr 2017 @ 13:57


Today I got a weird error on code that should just work.

Cryptographic failure while signing assembly '<Debug Assembly Full Path>' -- 'Error signing assembly -- Unknown error (8013141c)'    <Solution Full Path>\CSC

The reason why I say this was weird was because it was working before I rebooted my machine. So it was obvious from reading this error that the signing of the assembly was causing the projects build to fail.

So first thing I did was open the project properties, go to the Signing Tab and uncheck the Sign the assembly checkbox.

image

This fixed my issue, but felt wrong and I knew it would bite me later. I thought a bit more about what was different before I rebooted and now and eventually remembered that before I rebooted I was running Visual Studio in Administrator mode before.

So I re-checked the Sign the assembly checkbox closed Visual Studio and then opened the project again with a new instance of Visual Studio that was running in Administrator mode

image

Rebuilt the solution and everything built as expected

ABOUT ME

Gordon Beeming works at Nologo Studios in the sunny city of Durban, South Africa. He is the Lead for the Data and Services Team and has a strong focus on Developer Efficiencies and R&D. When he's not hacking away at a keyboard in Visual Studio he'll generally be relaxing with his family or hitting the black top getting in some mileage. He is a Visual Studio ALM Ranger and Visual Studio ALM MVP.

Follow me on Strava