Page 1 of 2

GAC Policy files don't install

Posted: Fri May 04, 2007 12:07 pm
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

Posted: Fri May 04, 2007 3:25 pm
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...

Posted: Mon May 07, 2007 3:56 pm
by ScanRite
So does that mean you've bugged it?

Posted: Mon May 07, 2007 7:11 pm
by MichaelNesmith
Yes...a fix should be available soon!

Posted: Mon May 07, 2007 7:21 pm
by MichaelNesmith
BTW - could you also post an MSI file which demonstrates the "proper" implementation of this feature?

Posted: Wed May 09, 2007 2:01 pm
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

Posted: Thu May 10, 2007 9:27 am
by MichaelNesmith
Great, thanks Duane :)

Publisher Policy Files...

Posted: Fri Oct 12, 2007 7:56 am
by TMacy
Has this been resolved? And if so, in what version?

Posted: Fri Oct 12, 2007 12:33 pm
by MichaelNesmith
Yes - fixed in InstallAware 7.

Excellent

Posted: Fri Oct 12, 2007 2:16 pm
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!

Being thick

Posted: Fri Nov 16, 2007 7:18 am
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.

Any clues?

Posted: Mon Nov 19, 2007 6:50 am
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.

Re: GAC Policy files don't install

Posted: Mon Feb 03, 2014 11:26 pm
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.

Re: GAC Policy files don't install

Posted: Tue Feb 04, 2014 11:56 am
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

Re: GAC Policy files don't install

Posted: Tue Feb 04, 2014 4:01 pm
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.