Today while I was playing with BizTalk Server 2006, yes I know very old stuff, but sometimes is needed… and for those who are accustomed to developer BizTalk solutions knows that we need to sign the project with a strong name assembly key file before we deploy them… nothing new.
The funniest part came when I tried to build the solution in Visual Studio, and I ended up getting this odd error:
Cryptographic failure while signing assembly ‘Myproject.dll’ — ‘The key container name ‘MyKey.snk’ does not exist’
At first, I thought I had set the path to the key wrong, but I quickly realized that was not the case, and if that was the case, we would have received a different error message:
Cryptographic failure while signing assembly ‘Myproject.dll’ – ‘Error reading key file ‘MyKey.snk’ — The system cannot find the file specified’
You have incorrectly defined a strong name key file!
The process to sign the project in Visual Studio 2010 is very different than in Visual Studio 2005. In 2005 we have 3 properties:
- Assembly Delay Sign
- Assembly Key File
- and Assembly Key Name
And we normally only need to configure the “Assembly Key File”… however, in my case I copied and configure the wrong property without intention which led to me to receive this error message, hehe
That easy, you have to properly configure the property “Assembly Key File”
Hehehe… Everyone make mistakes, hehe lesson learned.