Sunday, February 22, 2009

Easitest way to add a .net assemply to the GAC (Global Assembly Cache)
sometimes you run into issues when trying to add a .net assemply to the GAC, especially when there are so many command options for the gacutil command.

You need the assemply to be strongly type, you use the "sn" command for that (from the dot net sdk command prompt).

To create a strong name key in visual studio, Open up the project in vs.net, and click on the project properties, go to the Signing Tab (6th at the bottom), and check the check box called "Sign the assemply", then choose "New" from the drop down. this will create a strong name key and also assign it to the assemply, now recompile the project, and then open windows explorer where the assemply is located, copy the location of the assemply, and then open a vs sdk command prompt, type in:

gacutil -i yourDLLName.dll

and you are set !!

happy programming!

4 comments:

Unknown said...
This comment has been removed by the author.
Unknown said...

I have the same problem. Have you figured anything out yet? Thanks.

Tamer said...

I ended up using C# since then :).

Unknown said...

i also have the same problems.Can someone help?
Thank