DrJones
Posts: 18
Joined: Wed Jun 28, 2006 10:00 pm

GAC/Driver install keeping original files

I have noticed that when using the Enterprise edition, if I install an assembly into the GAC, or if I install a driver, the original copy of that file in the filepath, is not actually installed on the system.

Is there a proper way to do this?

For instance, if I have a appdir/drivers/mydriver.inf file, I would like to install it onto the system, and use it for the driver install part of the installer. This way, it will automatically store it on the system, but it will also be there in the directory in case the user needs to reinstall later.

The same goes for the GAC. I would like my assembly there so that it can be referenced by applications, but also in the application directory so that I can add the registry key so that users can reference the assembly in visual studio.

Right now, if I point the installer to the files as they exist in the directory structure, they are removed after they are added to the GAC or installed as a driver.

How can I fix this?
thlucas
Posts: 10
Joined: Mon Feb 09, 2004 3:30 pm
Location: Omaha, NE
Contact: Website

I reported this back in June of 2005, but it has not been implemented yet. I'm glad to see that I'm not the only one with this problem. Once they add this, I may look at purchasing a license again - I let my current one drop due to this, as it is an important feature for me.

http://www.advancedinstaller.com/forums ... hlight=gac
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
Right now, if I point the installer to the files as they exist in the directory structure, they are removed after they are added to the GAC or installed as a driver.
This is because windows installer does not have directly support to install an assembly in both GAC and private folder. We have this feature on our TODO list (I increase it's priority) and will be available in a future release.

Until then you can add the assembly file twice (in separate folders) in the "Files and Folders" page. One authored as a global assembly and the other as a private install.

Regarding the drivers please tell me if you use "Drivers" features that comes with Advanced Installer or you use a custom action? Because I test and all driver files are installed in the installation folder.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Hi Gigi,

Do you know if this feature was implemented already (if not, when will it be implemented)? I'm trying to do the same as both users above and I'm running into exactly the same problem. All I need is for the Files to get registered to GAC and left on the installation folder.
I also noticed that when I un-install the application, those files are not removed from the GAC.
I'll be trying to add the files twice, but I'm not sure how, could you please tell me how can I acomplish that?

Thanks,
Marcelo
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi Marcelo,
Do you know if this feature was implemented already (if not, when will it be implemented)?
This feature has not been implemented yet and I'm afraid I cannot give you an ETA for now.
All I need is for the Files to get registered to GAC and left on the installation folder. I'll be trying to add the files twice, but I'm not sure how, could you please tell me how can I acomplish that?
This can be done by adding the assembly twice in the "Files and Folders" page (in different folders).

One folder (for example "Application Folder") will contain one copy of the assembly (which will remain in the installation folder) and another folder (for example "Desktop") will contain another copy of the assembly (which will go into the GAC). You will establish where each copy goes in the "Assemblies" page.
I also noticed that when I un-install the application, those files are not removed from the GAC.
.Net 2.0 assemblies requires the "ProcessorArchitecture" attribute in order to be uninstalled. Add this attribute to the "Attributes" list of the "Assemblies" properties page with the proper value (X86, Amd64, MSIL, etc).

This attribute corresponds to the platform for which the assembly has been built and has one of the following values:

Amd64 -- A 64-bit AMD processor only.
IA64 -- A 64-bit Intel processor only.
MSIL -- Neutral with respect to processor and bits-per-word.
None -- An unknown or unspecified combination of processor and bits-per-word.
X86 -- A 32-bit Intel processor, either native or in the Windows on Windows (WOW) environment on a 64-bit platform

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi Marcelo,
Do you know if this feature was implemented already (if not, when will it be implemented)?
This feature has not been implemented yet and I'm afraid I cannot give you an ETA for now.
All I need is for the Files to get registered to GAC and left on the installation folder. I'll be trying to add the files twice, but I'm not sure how, could you please tell me how can I acomplish that?
This can be done by adding the assembly twice in the "Files and Folders" page (in different folders).

One folder (for example "Application Folder") will contain one copy of the assembly (which will remain in the installation folder) and another folder (for example "Desktop") will contain another copy of the assembly (which will go into the GAC). You will establish where each copy goes in the "Assemblies" page.
I also noticed that when I un-install the application, those files are not removed from the GAC.
.Net 2.0 assemblies requires the "ProcessorArchitecture" attribute in order to be uninstalled. Add this attribute to the "Attributes" list of the "Assemblies" properties page with the proper value (X86, Amd64, MSIL, etc).

This attribute corresponds to the platform for which the assembly has been built and has one of the following values:

Amd64 -- A 64-bit AMD processor only.
IA64 -- A 64-bit Intel processor only.
MSIL -- Neutral with respect to processor and bits-per-word.
None -- An unknown or unspecified combination of processor and bits-per-word.
X86 -- A 32-bit Intel processor, either native or in the Windows on Windows (WOW) environment on a 64-bit platform

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi Marcelo,
Do you know if this feature was implemented already (if not, when will it be implemented)?
This feature has not been implemented yet and I'm afraid I cannot give you an ETA for now.
All I need is for the Files to get registered to GAC and left on the installation folder. I'll be trying to add the files twice, but I'm not sure how, could you please tell me how can I acomplish that?
This can be done by adding the assembly twice in the "Files and Folders" page (in different folders).

One folder (for example "Application Folder") will contain one copy of the assembly (which will remain in the installation folder) and another folder (for example "Desktop") will contain another copy of the assembly (which will go into the GAC). You will establish where each copy goes in the "Assemblies" page.
I also noticed that when I un-install the application, those files are not removed from the GAC.
.Net 2.0 assemblies requires the "ProcessorArchitecture" attribute in order to be uninstalled. Add this attribute to the "Attributes" list of the "Assemblies" properties page with the proper value (X86, Amd64, MSIL, etc).

This attribute corresponds to the platform for which the assembly has been built and has one of the following values:

Amd64 -- A 64-bit AMD processor only.
IA64 -- A 64-bit Intel processor only.
MSIL -- Neutral with respect to processor and bits-per-word.
None -- An unknown or unspecified combination of processor and bits-per-word.
X86 -- A 32-bit Intel processor, either native or in the Windows on Windows (WOW) environment on a 64-bit platform

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Hi cosmin,

After adding the attribute "ProcessorArchitecture" to each of my assembly, I noticed that they don't even go to GAC at all anymore.

I'm looking at c:\windows\assembly right when Advanced Installer calls my .NET Custom action on the installation.

I've added "ProcessorArchitecture" = "MSIL" to all of them (no quotes).

What did i do wrong?
Thanks,
Marcelo
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Please note that only .Net 2.0 assemblies use the "ProcessorArchitecture" attribute. Also, you need to make sure that the MSIL attribute is supported by your assembly.

Let me know if these requirements are met and the problem persists.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Hi Cosmin,

I'm sure they are all .NET 2.0 assemblies and I'm not sure how can I check the processor architecture, but when I use GACUTIL.exe to add those assemblies to the cache, they show up all as MSIL on the assembly list, so I'm assuming they all support MSIL.
Still the installation does not add the files to the GAC list.

Thanks,
Marcelo
marcelo
Posts: 103
Joined: Fri Sep 28, 2007 2:07 pm

Hi Cosmin,

I found the problem. I was using the attribure "ProcessorArchitecture", but after researching a little bit it seems that the name is case sensitive, so after I changed to "processorArchitecture" it worked!

Thanks,
Marcelo

Return to “Common Problems”