GAC Policy files don't install

Got a problem you cannot solve? Try here.
ScanRite
Posts: 4
Joined: Fri May 04, 2007 11:44 am

GAC Policy files don't install

Post by ScanRite »

First off, I converted from Wise after several years of using it. While the older product was pretty good, their latest versions downright stink. By pure luck, I found InstallAware (wasn't even looking at the time) and immediately fell in love with it. I've been using it for several months and other than a few quirks, works awesome!

I'm hoping I just overlooked something, but I cannot figure out how to get a GAC policy file to get installed. GAC policies are actually made up of two files, a DLL and a Config file. If I add only the DLL portion, I get an error that one or more modules of the assembly are missing. I assume it's referring to the .Config file. However, if I add the .Config file (like I used to in Wise), InstallAware won't compile. It appears it doesn't know what to do with it.

The files are correct (they have a strongname, etc.) and do install into the GAC okay, just not with InstallAware (using 6.4).

Can anyone assist on this? Attached is a screenshot of the error during installation and the two policy... files to be added to the GAC, should Dev desire to test them.

Thanks,

Duane

File Attached:

PolicyFiles.zip
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Sorry, this does look like its trying to read the file and version information from the Config file, which is failing the build as it cannot be found there...
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
ScanRite
Posts: 4
Joined: Fri May 04, 2007 11:44 am

Post by ScanRite »

So does that mean you've bugged it?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Yes...a fix should be available soon!
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

BTW - could you also post an MSI file which demonstrates the "proper" implementation of this feature?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
ScanRite
Posts: 4
Joined: Fri May 04, 2007 11:44 am

Post by ScanRite »

You betcha. Attached is a very simple MSI, that installs two files to the GAC.

Note: In the 6.x version of Wise, I merely selected the Policy.x.DLL file and the Policy.x.Config was automatically added to the Assembly folder in the Wise IDE.

After running this, you should have a policy.1.7.ASDS.Shared.IO.dll in your \\windows\\assembly view.

If you go farther and drill down to the actual location of the DLL,

C:\\WINDOWS\\assembly\\gac\\policy.1.7.ASDS.Shared.IO\\1.7.0.0__e5728bca003b0d1a

you'll see the .config file sitting there as well.

Let me know if you need anything else.

Duane :)

File Attached:

PolicyTestInstaller.zip
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Great, thanks Duane :)
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
TMacy
Posts: 29
Joined: Sat Feb 03, 2007 8:16 am

Publisher Policy Files...

Post by TMacy »

Has this been resolved? And if so, in what version?
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Yes - fixed in InstallAware 7.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
TMacy
Posts: 29
Joined: Sat Feb 03, 2007 8:16 am

Excellent

Post by TMacy »

If you can answer my other e-mailed support questions, then it looks like I'll have a reason to update to 7 and stay with InstallAware.

Thanks!
Martin Gay
Posts: 2
Joined: Fri Nov 16, 2007 6:15 am

Being thick

Post by Martin Gay »

I am still getting a problem when I attempt to install my policy into the GAC.

I have looked at the msi from a few posts ago and I guess these are the lines of interest. It would appear that the config files gets installed into the target directory and then install the dll into the GAC.

Code: Select all

    Install Files C:\\Documents and Settings\\marting\\My Documents\\PolicyTestInstallerZZ\\Cabs.w1.cab\\policy.1.7.asds.shared.io.config\\policy.1.7.asds.shared.io.config to $TARGETDIR$
    Install Assembly C:\\Documents and Settings\\marting\\My Documents\\PolicyTestInstallerZZ\\Cabs.w1.cab\\policy.1.7.ASDS.Shared.IO.dll\\policy.1.7.ASDS.Shared.IO.dll to Global Assembly Cache
I have attempted something similar, without success. I am getting an error message at runtime:

"An error occurred during the installation of assembly'xxxx'. One or more modules of the assembly could not be found. HRESULT 0x80131042

I am guessing that copying the config file to the TARGETDIR doesn't make any difference because the policy dll and config file have to be located in the same directory I think at registration time.

Any help on how to install a policy file using version 7 would be appreciated.
Martin Gay
Posts: 2
Joined: Fri Nov 16, 2007 6:15 am

Any clues?

Post by Martin Gay »

Is there documentation or a sample that shows how to register a policy file to the GAC with version 7. Seems a simple request.
ScottSedgwick
Posts: 2
Joined: Mon Feb 03, 2014 11:22 pm

Re: GAC Policy files don't install

Post by ScottSedgwick »

It has been 7 years since you were asked to provide an example of how to do this. Any chance you will provide one? We're struggling to get policy files installed. Please help.
FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: GAC Policy files don't install

Post by FrancescoT »

Dear User,

To add the publisher a policy assembly to the global assembly cache, use the "RUN PROGRAM" command to execute the gacutil tool.

In other words, the same of using the following command at the command prompt:

gacutil /i publisherPolicyAssemblyFile

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
ScottSedgwick
Posts: 2
Joined: Mon Feb 03, 2014 11:22 pm

Re: GAC Policy files don't install

Post by ScottSedgwick »

Thanks Francesco,

But doesn't that mean that the PC you are installing on will need to have the .NET SDK installed and configured? Or are you suggesting we ship gacutil.exe with our product?

Regards,

Scott.
Post Reply