Home All Groups Group Topic Archive Search About
Author
27 Jun 2005 9:05 PM
John
Hi

I have a class project which generates a dll which I would like to install
in the gac. When I build the project, I get the following error;

Unable to build assembly XXX into the Global Assembly Cache; the assembly is
not strongly named.

What do I need to do to get the assembly strongly named?

Thanks

Regards

Author
27 Jun 2005 9:23 PM
Armin Zingler
"John" <John@nospam.infovis.co.uk> schrieb
> Hi
>
> I have a class project which generates a dll which I would like to
> install in the gac. When I build the project, I get the following
> error;
>
> Unable to build assembly XXX into the Global Assembly Cache; the
> assembly is not strongly named.
>
> What do I need to do to get the assembly strongly named?



http://msdn.microsoft.com/library/en-us/cpguide/html/cpconworkingwithstrongly-namedassemblies.asp


Armin
Author
27 Jun 2005 9:43 PM
Mike Labosh
> What do I need to do to get the assembly strongly named?

Any assembly that you want to put into the GAC is required to have a "Strong
Name".  Here's how to do it:


In your Visual Studio .NET -> Tools program group launch a Visual Studio
..NET 2003 Command Prompt.  Then do this to see the command syntax:

sn /?

To generate a Strong Name Key, do this:

sn -k MyAssemblyName.snk

Then put that file in your project directory (where your source code is)

Then open up your project's AssemblyInfo file and add this:

<Assembly:AssemblyKeyFileAttribute("MyAssemblyName.snk")>

(You may have to monkey around with the relative path of the filename inside
the attribute.)

In MSDN Library, goto the index tab and goto "strong-named assemblies"
--
Peace & happy computing,

Mike Labosh, MCSD

"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this new system SUCKS."
-- General Barringer, "War Games"
Show quoteHide quote
"John" <John@nospam.infovis.co.uk> wrote in message
news:%23Eognv1eFHA.2128@TK2MSFTNGP14.phx.gbl...
> Hi
>
> I have a class project which generates a dll which I would like to install
> in the gac. When I build the project, I get the following error;
>
> Unable to build assembly XXX into the Global Assembly Cache; the assembly
> is not strongly named.
>
>
> Thanks
>
> Regards
>
>
>
Author
27 Jun 2005 9:44 PM
Crouchie1998