Error while building a BizTalk 2006 solution on Visual Studio 2005: The key container name ‘key.snk’ does not exist

Posted: January 12, 2013  |  Categories: BizTalk Deployment Visual Studio

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’

Cause

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

assembly-sign-strong-name

Solution

That easy, you have to properly configure the property “Assembly Key File”

Hehehe… Everyone make mistakes, hehe lesson learned.

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top