473,657 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error While Signing An Assembly...

I have encountered an error while attempting to sign an assembly. I have
become quite frustrated since I seem to be going in circles and making no
progress. Hopefully someone will have the magic answer.

I am new to this so I will try to describe everything as well as I can.
There are probably a number of things that I am doing wrong so I will try to
desribe the errors that I am receiving along with things that I have tried
and observations and questions.

I have picked up a handful of projects from another developer that use a
..SNK file to sign the assemblies. When I attempt to compile a project, a
CS1548 compiler error is generated with the text "Cryptograp hic failure while
signing assembly <assembly name-- 'The key container name <key container
namedoes not exist".

In order to try to fix this error, I executed the command "sn -i <key
container name<key file>".

When I compile, a different error message is generated. This time, a CS1606
compiler error is generated with the text "Assembly signing failed; output
may not be signed -- The system cannot fine the file specified".

It seems like I cannot resolve either of these two error messages (or if I
resolve one the other one appears).

The .SNK file I am using was generated on another machine. Are .SNK files
machine specific? If so, this may be a source of a problem.

The project is using an AssemblyKeyName Attribute. When I compile, I also
receive a warning that I should use the command line option /keycontainer or
appropriate project settings instead of AssemblyKeyName Attribute. The help
file (for Visual Studio 2005) appears to make no mention of this attribute
when describing how to sign an assembly. Could this also be part of the
problem?

If anyone can make sense out of this mess it will be greatly appreciated.

Thank you,

Jason Richmeier

Jul 12 '06 #1
1 14495
Hi Jason,

Thank you posting!

Singing an assembly in VS2005 adopts a different approach from VS2003.
Instead, you can specify the name of the .snk file in a property of the
project, just right-click on the project in the solution explorer and
select Properties. Then click on the Signing tab. The path to the .snk
file can be specified there.
I suggest you can specify the original .snk file which you get with the
projects, and comment out the corresponding AssemblyKeyName Attribute code
line.

How to: Sign an Assembly (Visual Studio)
http://msdn2.microsoft.com/en-us/library/ms247123.aspx

If the above method still does not work, then the original .snk file may be
corrupted. In this regard, you can create your own .snk file. Just type the
command line: sn -k mykey.snk and move resulting mykey.snk to a folder
where you likely to put your development files. Then use the above approach
to specify that key file for signing the assembly.
Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
10694
by: Joel Leong | last post by:
I wish to know the industrial practices for signing assemblies with key files. I genereted a key file to sign my assemblies. Should I sign all my assemblies with a single key files or I shall generate one key file for each assembly? Perhaps, I should generate a key file per group of related assemblies?
3
3161
by: bob | last post by:
Hello, I thought assembly signing might add protection against people reverse engineering my program, removing the protection and using it illegally. But it seems they can just stop the clr from authenticating it with Sn -Vr. Is that true, or have I misunderstood?
0
7783
by: Scott Chang | last post by:
Hi all, I have Microsoft Visual C++ .NET (2002) program that is installed on my Windows XP Professional Operating System PC. I started my project (named HelloMCPP)in the Managed C++ Application and added a DLL in the .h file to my project for printing "Hello from Managed C++!" out in my console. I did "Build" the program 'HelloMCPP' and I got 'Fatal Error LNK1561: entry point must be defined HelloMCPP'. I do not know how to define the...
1
1673
by: AVL | last post by:
Hi I need some clarification on signing. what does it mean--signing an assembly? where is ti used? How is it used?
2
4688
by: craigwhunt | last post by:
Hi all, I am deploying my ASP.NET 2.0 bits. Everything works fine in dev, but when I move it to test I get the following: CS1548: Cryptographic failure while signing assembly 'c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\internal-test\f51ce07b\7f3f6ce4\App_Code.9rzbep5y.dll' -- 'Error reading key file 'MyKey.snk' -- The system cannot find the file specified. '
2
1635
by: Richard B | last post by:
I added a .NET dll as a reference to my new .NET dll. When I went to build, I received error "Unable to emit assembly: Referenced assembly 'CrystalReport' does not have a strong name". "CrystalReport" is a .NET dll I built which calls the third-party Crystal dll. I have no problem when I call the "CrystalReport" dll from my .NET executables. I never had to call a .NET dll from a .NET dll before. I figured it would a no-brainer as...
0
489
by: Alun Jones | last post by:
I'm getting the above error in a dialog box from Visual Studio 2005 when trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX file has been used for code-signing before (to sign an InfoPath form), so therefore the file contains a valid code-signing key. I have the correct password to the PFX file (because I get a different error
0
1021
by: adam3223 | last post by:
I have a mixed code dll which will be used by many developers to build applications on top of. I've read signing an assembly is recommended to rule out any naming conflicts, and increase security. However I believe that signing a dll uses it version number as part of the signing process, the problem being: If i initially released v1.0.0.0 and other developers generated applications using it, if i updated the dll to v1.0.0.1 its...
6
5670
by: raylopez99 | last post by:
Anybody use Strong Name Signing? I think this is used by default for Resource files, which is one reason perhaps I can't get my resource files to work (somehow the public key is messed up, perhaps since I've installed so many versions of Visual Studio) RL http://msdn.microsoft.com/en-us/library/h4fa028b.aspx Deployment in Visual Studio
0
8413
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8842
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8740
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8513
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.