compiling to GAC with VS.NET?  
Author Message
tacwalker





PostPosted: Tue Sep 28 07:57:15 CDT 2004 Top

Visual C#.Net >> compiling to GAC with VS.NET?

Hello

I was wondering what's needed to do to do this in VS.NET?

http://www.hide-link.com/

so i dont have to use that cmd-prompt :)

can i just change some compilesettings or something?

TIA
/Lasse

DotNet195  
 
 
Nicholas





PostPosted: Tue Sep 28 07:57:15 CDT 2004 Top

Visual C#.Net >> compiling to GAC with VS.NET? Lasse,

To set the strong name of a component, you will have to generate a
strong name key. This can only be done from the command line. Once you do
that, you can set the AssemblyKeyNameFile attribute to point to the file
that has the key in it.

Then, in VS.NET, you can create a pre and post build step that will call
GACUTIL to unregister the old version and register the new version of the
assembly in the gac (before and after the build respectively).

VS.NET makes the key generation portion of this part easier in VS.NET
2005. However, to register in the GAC, you will still have to create a pre
and post build step.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]




> Hello
>
> I was wondering what's needed to do to do this in VS.NET?
>
> http://www.123aspx.com/redir.aspx?res=29946
>
> so i dont have to use that cmd-prompt :)
>
> can i just change some compilesettings or something?
>
> TIA
> /Lasse
>
>


 
 
Bonj





PostPosted: Tue Sep 28 07:59:04 CDT 2004 Top

Visual C#.Net >> compiling to GAC with VS.NET? Don't know of any already-existing way, but you could possibly write an
Add-in / macro to automate the running of sn.exe that has to be done from the
command line.
 
 
Lasse





PostPosted: Tue Sep 28 08:41:28 CDT 2004 Top

Visual C#.Net >> compiling to GAC with VS.NET? Nicholas,

thx...

will it output one file or will there be more files that's needed?






> Lasse,
>
> To set the strong name of a component, you will have to generate a
> strong name key. This can only be done from the command line. Once you
do
> that, you can set the AssemblyKeyNameFile attribute to point to the file
> that has the key in it.
>
> Then, in VS.NET, you can create a pre and post build step that will
call
> GACUTIL to unregister the old version and register the new version of the
> assembly in the gac (before and after the build respectively).
>
> VS.NET makes the key generation portion of this part easier in VS.NET
> 2005. However, to register in the GAC, you will still have to create a
pre
> and post build step.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]

>


> > Hello
> >
> > I was wondering what's needed to do to do this in VS.NET?
> >
> > http://www.123aspx.com/redir.aspx?res=29946
> >
> > so i dont have to use that cmd-prompt :)
> >
> > can i just change some compilesettings or something?
> >
> > TIA
> > /Lasse
> >
> >
>
>


 
 
Nicholas





PostPosted: Tue Sep 28 08:44:39 CDT 2004 Top

Visual C#.Net >> compiling to GAC with VS.NET? Lasse,

What are you referring to? If you call GACUTIL, it will not output
anything. If you call SNK.EXE, it will output one file, the strong name
key.


--
- Nicholas Paldino [.NET/C# MVP]




> Nicholas,
>
> thx...
>
> will it output one file or will there be more files that's needed?
>
>
>
>

> in

>> Lasse,
>>
>> To set the strong name of a component, you will have to generate a
>> strong name key. This can only be done from the command line. Once you
> do
>> that, you can set the AssemblyKeyNameFile attribute to point to the file
>> that has the key in it.
>>
>> Then, in VS.NET, you can create a pre and post build step that will
> call
>> GACUTIL to unregister the old version and register the new version of the
>> assembly in the gac (before and after the build respectively).
>>
>> VS.NET makes the key generation portion of this part easier in VS.NET
>> 2005. However, to register in the GAC, you will still have to create a
> pre
>> and post build step.
>>
>> Hope this helps.
>>
>>
>> --
>> - Nicholas Paldino [.NET/C# MVP]

>>


>> > Hello
>> >
>> > I was wondering what's needed to do to do this in VS.NET?
>> >
>> > http://www.123aspx.com/redir.aspx?res=29946
>> >
>> > so i dont have to use that cmd-prompt :)
>> >
>> > can i just change some compilesettings or something?
>> >
>> > TIA
>> > /Lasse
>> >
>> >
>>
>>
>
>