I've read what the help file says about "Install Assembly" and "Register Assembly", and I'm still not confident I get it. Here's what I think I understand:
"Install Assembly" is an MSI command that will optionally install the assembly into the GAC, and it will "regasm" the assembly for you to make it available for COM interop. Because it's MSI, it will automatically unregister the assembly when you unintall.
"Register Assembly" is just a wrapper around "regasm". It's not MSI, so it executes immediately. You are responsible to unregister your assembly during uninstall.
Does this sound right?
--Troy
What exactly does \"Install Assembly\" do?
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Install Assembly populates the MSI database tables for assemblies, in addition to creating the entries for the MSI database tables for files. It lets you put an assembly in the GAC or elsewhere on your system. It does not register the assembly - this is a seperate step/command.
Note that MSI will not automatically uninstall assemblies installed into the GAC, this is by design in MSI.
Note that MSI will not automatically uninstall assemblies installed into the GAC, this is by design in MSI.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
OK, "Install Assembly" makes perfect sense to me when installing into the GAC. I'm going use this for one of my shared assemblies.
But for local assemblies, "Install Assembly" seems equivalent to "Install Files". Maybe I don't understand the significance, in this context, of telling MSI what type of file this is. Why does MSI care that this file happens to be a local assembly?
I have one local assembly that I need to "regasm ..." for COM interop. I like how "Register Assembly" does this for me. But when I uninstall I should call "regasm /unregister ...". Will I have to resort to "Run Program" in this case? Or is there a nice wrapper for this I'm missing?
--Troy
But for local assemblies, "Install Assembly" seems equivalent to "Install Files". Maybe I don't understand the significance, in this context, of telling MSI what type of file this is. Why does MSI care that this file happens to be a local assembly?
I have one local assembly that I need to "regasm ..." for COM interop. I like how "Register Assembly" does this for me. But when I uninstall I should call "regasm /unregister ...". Will I have to resort to "Run Program" in this case? Or is there a nice wrapper for this I'm missing?
--Troy
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
I believe you'll need to call regasm manually to unregister, using Run Program.
To be honest, I'm not sure what difference it makes to use Install Assembly outside of the GAC compared to using Install Files.
To be honest, I'm not sure what difference it makes to use Install Assembly outside of the GAC compared to using Install Files.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
I am trying to register a couple of VS 2005 (C#.NET) dlls for COM interop (regasm). I have tried Install Assembly to $COMMONFILES$\\Allenbrook and they don't register. I have tried using Install Files and then Register Assembly and they don't register. Any ideas? I am new to InstallAware and flying pretty blind right now.
I have enclosed a screen shot of my script.
File Attached:
InstallAwarePost_COM_REGASM.doc
I have enclosed a screen shot of my script.
File Attached:
InstallAwarePost_COM_REGASM.doc
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Tip: Use Ctrl+Shift+C to copy code to the clipboard in human readable form (so there is no need to take IDE screenshots).
As for the actual issue...try to enter the full target path of the assembly in the command, instead of the assembly name. The assembly name probably doesn't work because you aren't installing into the GAC with Install Assembly (and instead using Install Files). It might also be worth trying to use Install Assembly outside of the GAC - that will probably also help resolve the assembly name.
Either way, if you enter the full target path to the assembly, it will work for sure ($COMMONFILES$\\...).
As for the actual issue...try to enter the full target path of the assembly in the command, instead of the assembly name. The assembly name probably doesn't work because you aren't installing into the GAC with Install Assembly (and instead using Install Files). It might also be worth trying to use Install Assembly outside of the GAC - that will probably also help resolve the assembly name.
Either way, if you enter the full target path to the assembly, it will work for sure ($COMMONFILES$\\...).
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Still no luck with registering those DLLs for COM interop. I have attached a TXT file with the human readable script in it.
File Attached:
InstallAwarePost_COM_REGASM.txt
File Attached:
InstallAwarePost_COM_REGASM.txt
-
- Posts: 3452
- Joined: Thu Dec 22, 2005 7:17 pm
- Contact:
Script looks good. Try to register the assemblies manually on the command line and see if that works?
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
It works manually. I did Start\\Run on my XP box and entered...
C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\regasm.exe "C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInProvider.dll"
File registered properly manually. Could InstallAware not be getting to the version 2.0 Regasm.exe and be running the version 1.1 Regasm?
If it is any help, I have the .InstallState and .InstallLog files created by the installer class of the dlls, when I run the install. I am including the log file text below and attaching the installstate file.
Installing assembly 'C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll'.
Affected parameters are:
assemblypath = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll
=
logfile = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.InstallLog
See the contents of the log file for the C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll assembly's progress.
The file is located at C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.InstallLog.
Committing assembly 'C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll'.
Affected parameters are:
logtoconsole =
assemblypath = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll
=
logfile = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.InstallLog
File Attached:
CQHPlugInInterface.InstallState
C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\regasm.exe "C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInProvider.dll"
File registered properly manually. Could InstallAware not be getting to the version 2.0 Regasm.exe and be running the version 1.1 Regasm?
If it is any help, I have the .InstallState and .InstallLog files created by the installer class of the dlls, when I run the install. I am including the log file text below and attaching the installstate file.
Installing assembly 'C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll'.
Affected parameters are:
assemblypath = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll
=
logfile = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.InstallLog
See the contents of the log file for the C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll assembly's progress.
The file is located at C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.InstallLog.
Committing assembly 'C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll'.
Affected parameters are:
logtoconsole =
assemblypath = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.dll
=
logfile = C:\\Program Files\\Common Files\\Allenbrook\\CQHPlugInInterface.InstallLog
File Attached:
CQHPlugInInterface.InstallState
Who is online
Users browsing this forum: No registered users and 151 guests