Re: How I add a Assembly to the gac in a installer proyect

From: Phil Wilson (pdjwilson_at_nospam.cox.net)
Date: 02/19/05


Date: Sat, 19 Feb 2005 10:45:23 -0800

Opinions differ of course, but the model MS is generally advising is
side-by-side. Why not just install a private copy with each app that uses
your assembly? I suggest you experiment with yoyr VS setup project and see
how it works if you want to replace your assembly in the GAC with a new one.
Just in terms of the setup project, you'll find some difficulties -
RemovePreviousVersions doesn't replace the assembly in the GAC (it repairs
later), and you can't change assemblyversion or strong name because your
clients won't work, so then you need policy assemblies in the GAC. To me,
there's a sense in which people treat the GAC like they did the Windows
System folder - just put everything in there and it works, but that's part
of what DLL Hell was all about. It's clear to me that MS is pushing
side-by-side as a deployment strategy with frameworks, Visual Studio, the
msvcr7x/atl7x/mfc7x support DLLs, sxs COM with manifest files and so on. So
that's more than just my two cents, but from a deployment and service pack
point of view, assemblies in the GAC are more difficult to deal with than
private assemblies in your client's application folders. Similar point of
view here:
http://www.sellsbrothers.com/spout/#Avoid_the_GAC

-- 
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280
"Ekempd" <Ekempd@discussions.microsoft.com> wrote in message 
news:4862C25D-79FA-4AA5-B850-F5E19DCEBB05@microsoft.com...
> Why? you scared to me ...
>
> from my point of view, seems to be very usefull when I want to keep a suit 
> a
> app using the same dll, and when I release a new version all use the new
> version, but only one copy of the dll in the machine
>
> there is some information about why not use GAC??
>
> "Phil Wilson" wrote:
>
>> In the File System view in the setup project, right click the words "File
>> System on Target Machine"  and Add Special Folder includes the GAC.
>> Updating assemblies in the GAC can be a bit tricky - VS setup projects
>> support RemovePreviousVersions to replace old versions of the product,
>> otherwise there are policy assemblies you can install to redirect clients 
>> to
>> different assemblies. If it were me, I'd avoid the GAC.
>> -- 
>> Phil Wilson
>> [Microsoft MVP-Windows Installer]
>> Definitive Guide to Windows Installer
>> http://apress.com/book/bookDisplay.html?bID=280
>>
>> "Ekempd" <Ekempd@discussions.microsoft.com> wrote in message
>> news:2CAF4370-A299-44EC-86DC-B1ACF3263F1F@microsoft.com...
>> >I want that my install proyect add an assembly to the gac, but I 
>> >couldn't
>> > find how..
>> >
>> > otherwise, if I re run the installer which a new vesion of the 
>> > assembly,
>> > will be this update in the gac for all the application??
>> >
>> >
>> > Thx for the help
>>
>>
>> 


Relevant Pages

  • Re: .NET versioning
    ... >> If this isn't dll hell then it's awfully close. ... > xcopy deployment, which thus means avoid the GAC if possible. ... > 2) if required, and if you really have to, copy the files to the GAC. ... If you overwrite assemblies in the GAC ...
    (microsoft.public.dotnet.framework)
  • Re: How can I use a dll with several programs?
    ... with the GAC is the possibility of a new version of a .dll unintentionally ... Maintaining backwards compatibility of a .dll by keeping ... largely removed DLL Hell from the Windows programming radar. ... 50% based on incorrect registry entries and since .NET assemblies don't ...
    (microsoft.public.dotnet.languages.vb)
  • Re: .NET versioning
    ... If you don't use the GAC, ... >> The key part here is 'installer'. ... behind singed assemblies and what not but others out there don't. ... shouldn't release policy files for their ODP.NET assemblies. ...
    (microsoft.public.dotnet.framework)
  • Re: How can I use a dll with several programs?
    ... The dll hell has everything to do with versioning of dll`s stored in one ... I don't think the DLL applies to the GAC or the Win32 Side-by-Side cache ... mechanism for Win32 assemblies. ... You should share assemblies by installing them into the global assembly ...
    (microsoft.public.dotnet.languages.vb)
  • Re: How can I use a dll with several programs?
    ... with the GAC is the possibility of a new version of a .dll unintentionally ... Maintaining backwards compatibility of a .dll by keeping its ... largely removed DLL Hell from the Windows programming radar. ... 50% based on incorrect registry entries and since .NET assemblies don't ...
    (microsoft.public.dotnet.languages.vb)

Loading