Friday 12 September 2008

Cryptographic failure while signing assembly (MSBuild / CruiseControl .NET)

I came across an interesting error through CruiseControl, when I updated one of our assemblies to be signed with a Strong Named Key File.  The CruiseControl build report stated:

errorCS1548: Cryptographic failure while signing assembly 'c:\myCheckoutArea\myProject\obj\Debug\myProject.dll' -- 'Access is denied. '

After much searching on the Internet and several red herrings later I finally stumbled across a solution.  Simply change the permissions on the %SystemDrive%\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys so that the user has full access to this folder.

No comments: