← all posts

Cryptographic failure while signing assembly

Gordon Beeming
Gordon Beeming

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.

Visual Studio project signing properties
Visual Studio project signing properties

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

Visual Studio running as administrator
Visual Studio running as administrator

Rebuilt the solution and everything built as expected

Gordon Beeming
Gordon Beeming

Father • Husband • Triathlete • SSW Solution Architect

Related posts