Re: Strong naming



> 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"
"John" <John@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:%23Eognv1eFHA.2128@xxxxxxxxxxxxxxxxxxxxxxx
> 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
>
>
>


.



Relevant Pages

  • Re: Accessing Directory Services from a SharePoint Web Part
    ... > code into a single DLL that I install into the GAC. ... in your assemblyinfo file, you add: ... If you do the Assert ... Joe K. ...
    (microsoft.public.dotnet.security)
  • RE: Biztalk orchestration assembly no able to load class library
    ... Check the AssemblyInfo file and look for AssemblyVersion. ... since you added a reference to the dll. ... I have put the assembly in GAC ... >>> library dll is not found in the health and activity tracking tool. ...
    (microsoft.public.biztalk.general)
  • Re: Accessing Directory Services from a SharePoint Web Part
    ... I've encapsulated my DirectoryServices call into its own assembly and ... This is necessary for SharePoint ... I installed the assembly in the GAC. ... > in your assemblyinfo file, ...
    (microsoft.public.dotnet.security)
  • Re: Access und .NET-DLLs
    ... der GAC ist mit dem Framework da. ... Tricky ist uebrigens auch die Versionierung. ... Wenn Du in der AssemblyInfo eine feste ... Versionsnummer eintraegst, ...
    (microsoft.public.de.access)
  • Re: .net 1.1 sp1 install may have broken vsnet debugging
    ... However, after making modifications, I couldn't get the debug symbols ... >> Turns out that it was because my AssemblyInfo file was specifying a version ... >> there were no debug files to load with the GAC version. ...
    (microsoft.public.dotnet.framework.setup)