We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Including Localised assemblies into the GAC

I have an assembly that is localised. When I look at the file structure I see the dll: Lookup.dll and there are also three folders en-au, en-ca and en-us. In each of these is a localised file Lookup.resources.dll. When I used to use the Visual Studio setup and deployment project these folders with their files would end up in the GAC and would show the folder structure too.

I am uncertain how I get them into the GAC using AI. I have them in my files and folders showing the three directory structure but I am not able to keep that structure when I go to assemblies and add them. I can see that there is a reference to the culture in the assembly attributes but I am not sure how this all ties in.

Thanks

David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Including Localised assemblies into the GAC

Hi David,

If you need to install the same assembly in both locations (in a folder on the disk and in the GAC), you can add the assembly file twice in the "Files and Folders" page (in two different folders). One file will be set for private installation and the other will be set for installation into the GAC.

Please let me know if that helped.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Including Localised assemblies into the GAC

Thanks but that is not really what I meant.

The localised assembly automatically creates three localised resource assemblies corresponding to the three cultures that I have localised the code with. When I would run the VS setup and deploy project and then install it, it would create three entries in the GAC consisting of the three resource assemblies each showing different cultures. I am trying to recreate the same outcome.

I am not sure how I should specify the three different cultures to be added to the GAC because as soon as I add one with the same name AI changes the name i.e. it adds a "_1

I am trying to get the following:
Capture.PNG
Capture.PNG (11.56 KiB) Viewed 5091 times
I have added the resource dlls in their folders to the files and folders area. When I try to add the resource to the assemblies area it changes their names. I can see that the culture values are OK
Capture2.PNG
Capture2.PNG (5.92 KiB) Viewed 5091 times
I did attempt to install this but I got the error
Capture3.PNG
Capture3.PNG (14.81 KiB) Viewed 5091 times
Thanks

David
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Including Localised assemblies into the GAC

Hello David,
I am not sure how I should specify the three different cultures to be added to the GAC because as soon as I add one with the same name AI changes the name i.e. it adds a "_1
Please note that Advanced Installer add the _1 to the Component name to which the related resources is assigned because you cannot have two component with the same name in the Organization page and also you cannot have two resources from different directories into the same Component. So, when you add it in the Assemblies page you will get the component name.

While for the error, I'm not sure why you encountered this behavior. In order to have a better view about this, can you please send us the related assembly, the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them? Also, can you please tell us if the behavior can be encountered on other machines?

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
zeiddev
Posts: 103
Joined: Sat Aug 10, 2013 12:30 am

Re: Including Localised assemblies into the GAC

I just tried the same method on a different machine and the files installed as they should have I will have to take a closer look at the first machine and see what is going on.

Thanks

David

Return to “Building Installers”