Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem deploying DLLs to the GAC in a Visual Studio Setup Project

"Assembly [AssemblyName] must have a shared name to be installed globally"

I am getting this error message when I try to deploy some component DLLs for my application to the Global Assembly Cache.

What is a shared name and how do i make sure my DLLs have one?

like image 501
brien Avatar asked Dec 12 '25 22:12

brien


2 Answers

A "shared name" must be a synonym for a "strong name," which is what I've always read/heard it called. That link shows how to sign an assembly with a strong name so that it can be added to the GAC.

like image 193
Kevin Gorski Avatar answered Dec 15 '25 16:12

Kevin Gorski


Are you sure it's not 'strong name' ? You have to sign your assemblies (see project properties in vs.net) before installing them in the gac.

Though in general, assemblies shouldn't be installed in the GAC. MS advices to only install component dlls which are used by many applications (e.g. control libraries) to install in the GAC. In general, one should keep the used assemblies local to the application itself so xcopy deployment is possible (as GAC installation isn't required for an application to run properly)

like image 26
Frans Bouma Avatar answered Dec 15 '25 15:12

Frans Bouma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!