473,395 Members | 1,622 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.

compiling to GAC with VS.NET?

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
Nov 16 '05 #1
4 2190
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]
- mv*@spam.guard.caspershouse.com

"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
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

Nov 16 '05 #2
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.
Nov 16 '05 #3
Nicholas,

thx...

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


"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:uh**************@TK2MSFTNGP11.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
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


Nov 16 '05 #4
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]
- mv*@spam.guard.caspershouse.com

"Lasse Edsvik" <la***@nospam.com> wrote in message
news:u$**************@TK2MSFTNGP11.phx.gbl...
Nicholas,

thx...

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


"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote
in
message news:uh**************@TK2MSFTNGP11.phx.gbl...
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]
- mv*@spam.guard.caspershouse.com

"Lasse Edsvik" <la***@nospam.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
> 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
>
>



Nov 16 '05 #5

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

Similar topics

0
by: Martin Bless | last post by:
I need to access a MSSQL database (MS-Sql, not MySQL!)and would very much like to use mssql-0.09.tar.gz which is available from http://www.object-craft.com.au/projects/mssql/download.html ...
3
by: modemer | last post by:
Hello, I got weird compiling message similar like following when I compiled my simple code on Sun 5.8 with CC WorkShop 6 update 2 C++ 5.3. CC -g -o myclass.o -c myclass.cpp CC -g -o main.o...
0
by: David W. Fenton | last post by:
Today I was working on a hideous old app that I created a long time ago that does a lot of showing/hiding/resizing of fields on one of the forms. I had used constants to store reference values for...
4
by: Aaron Queenan | last post by:
When I build a C++ library to .NET using the managed C++ compiler, I get the following error message: Linking... LINK : error LNK2020: unresolved token (0A000005) _CrtDbgReport LINK : error...
2
by: Rudy Ray Moore | last post by:
Hi guys, I just upgraded to "Visual Studio .net 2003 7.1 c++" from VS6. Some things I like (proper for loop variable scoping, for example), but some other things are troubling me. One...
1
by: Jim Heavey | last post by:
Hello, trying to round out my knowlege here about compiling. To date I have used VS.Net to do all my compiling "majically", but I want to understand how to do it on my own, should the need ever...
10
by: Christina N | last post by:
When compiling my ASP.Net application, VS puts the new DLL under the local cached directory 'VSWebCache' in stead of on the server. How can I make it save the DLL file on the server when compiling?...
2
by: Justin Naidl | last post by:
A group of friends and I are doing a RPG (role-playing game) maker for a school project. It occured to us, however, that if you want the user to be able to have almost complete control over the...
8
by: WebSnozz | last post by:
I have an application written in C that does a lot of low level stuff. It does a lot of things like casting from void*'s. I want to create a new GUI for it in either C# or MC++, but reuse the...
0
by: =?Utf-8?B?amVmZmVyeQ==?= | last post by:
i need help compiling code dynamically it may involve some reflection so if any one is any good in that field or compiling code this would be a great time to show me what you know. by the way my...
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...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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.