473,395 Members | 1,456 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,395 software developers and data experts.

How can I give an assembly a valid strong name


When I run FXCop(1.32) against my project I keep getting the error "Assemblies should have strong names" and cannot get rid of the
message.

I edited the assembly info :

[assembly: AssemblyTitle("Tiler")]
[assembly: AssemblyDescription("Test Program")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Joe Software")]
[assembly: AssemblyProduct("TestProgram")]
[assembly: AssemblyCopyright("(c) 2005 Joe Software")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyName("")]
I have created a key pair using sn.exe -k and signed the assembly under the Signing tab on the Project Properties page.

I have absolutely no idea what I am doing wrong. The FX help page mentions adding the /keyfile and /keycontainer compiler options. I
am using Visual C# 2005 Express at the moment and can find nowhere to add the options.

It would be nice to get rid of this message.

Any help would be very welcome.
Thanks,
Steve
Nov 17 '05 #1
2 3577
"steve bull" <bu****@comcast.net> wrote in message
news:gE**************************@4ax.com...

When I run FXCop(1.32) against my project I keep getting the error
"Assemblies should have strong names" and cannot get rid of the
message.

I edited the assembly info :

[assembly: AssemblyTitle("Tiler")]
[assembly: AssemblyDescription("Test Program")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Joe Software")]
[assembly: AssemblyProduct("TestProgram")]
[assembly: AssemblyCopyright("(c) 2005 Joe Software")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyName("")]
I have created a key pair using sn.exe -k and signed the assembly under
the Signing tab on the Project Properties page.

I have absolutely no idea what I am doing wrong. The FX help page mentions
adding the /keyfile and /keycontainer compiler options. I
am using Visual C# 2005 Express at the moment and can find nowhere to add
the options.

It would be nice to get rid of this message.

Any help would be very welcome.
Thanks,
Steve


Sounds to me like you are using the version for 1.1 not for 2.0. You used to
sign an assembly using the AssemblyKeyFile attribute. Under 2.0 you sign
using the /keyfile command line switch (which is what the signing tab does).

FXCop is probably looking for the attribute and finding that its not set.
Unfortunately I can't see a version of FXCop for version 2.0 RTM on the
homepage

http://www.gotdotnet.com/team/fxcop/

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Re
Nov 17 '05 #2

Thanks, I will keep an eye out for a new version.

Steve

On Mon, 14 Nov 2005 09:15:26 -0000, "Richard Blewett [DevelopMentor]" <richard at nospam dotnetconsult dot co dot uk>
wrote:
"steve bull" <bu****@comcast.net> wrote in message
news:gE**************************@4ax.com...

When I run FXCop(1.32) against my project I keep getting the error
"Assemblies should have strong names" and cannot get rid of the
message.

I edited the assembly info :

[assembly: AssemblyTitle("Tiler")]
[assembly: AssemblyDescription("Test Program")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Joe Software")]
[assembly: AssemblyProduct("TestProgram")]
[assembly: AssemblyCopyright("(c) 2005 Joe Software")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyName("")]
I have created a key pair using sn.exe -k and signed the assembly under
the Signing tab on the Project Properties page.

I have absolutely no idea what I am doing wrong. The FX help page mentions
adding the /keyfile and /keycontainer compiler options. I
am using Visual C# 2005 Express at the moment and can find nowhere to add
the options.

It would be nice to get rid of this message.

Any help would be very welcome.
Thanks,
Steve


Sounds to me like you are using the version for 1.1 not for 2.0. You used to
sign an assembly using the AssemblyKeyFile attribute. Under 2.0 you sign
using the /keyfile command line switch (which is what the signing tab does).

FXCop is probably looking for the attribute and finding that its not set.
Unfortunately I can't see a version of FXCop for version 2.0 RTM on the
homepage

http://www.gotdotnet.com/team/fxcop/

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk
Re


Nov 17 '05 #3

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

Similar topics

3
by: Avin Patel | last post by:
Hi, I have one weakly named(i.e. not strong named) assembly/xyz.dll. And other strong named assemblies/.dll. I have found that I can't use weakly named assembly with strong named assembly. How...
3
by: Tony Jones | last post by:
I have a third party assembly that I need to strong name because the C# project I'm referencing it in will be strong named. Every time I compile my project I'm getting "Assembly generation failed...
10
by: Tony Jones | last post by:
Can anyone think of a reason why a 3rd party vendor writing .NET components would NOT strong name their assemblies? What harm does adding a strong-name to assembly present - I would think none...
1
by: Nadav | last post by:
Hi, Introduction: **************** I have created a .NET COM interop Assembly, this assembly references another COM object. The Problem: ***************** To enable registration of the...
1
by: Hatim Ali | last post by:
Hello, I have a class library project which has a class supporting COM+ transactions. This class library project refers a COM interop assembly. Now i need to register the assembly after...
3
by: edge | last post by:
Is there any way to Assembly.Load() dynamically the DLLs of my project, with their strong names, but without the need to specify a version? I just want the public/private key to exist as a measure...
3
by: Richard | last post by:
Hi, We would like our application to be signed and have a strong name. However our application references a 3rd party .dll that does not have a strong name and so when we compile we get the...
14
by: Monty | last post by:
Hello, I have created a solution which has both a web UI and a winform UI, the latter is just for administrators. The Web UI (a Web Application Project) and the winform project both...
4
by: james | last post by:
Hi All, Would anyone mind going over how to strong name an assembly after it has been compiled? I was looking at AL.exe, but it won't take in .dll files. I'm not sure if I can strip out the...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.