473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 "Cryptographic 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 AssemblyKeyNameAttribute. When I compile, I also
receive a warning that I should use the command line option /keycontainer or
appropriate project settings instead of AssemblyKeyNameAttribute. 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 14454
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 AssemblyKeyNameAttribute 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
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...
3
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...
0
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...
1
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
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...
2
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". ...
0
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...
0
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....
6
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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...

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.