PDA

View Full Version : Registering a .Net Assembly with /codebase



crewsr
03-13-2008, 02:35 PM
I'm trying to author an installer that will register a .Net assembly and registration doesn't seem to work. I need the equivalent to 'RegAsm.exe <filename.dll> /codebase'. Searching seems to indicate that checking the '.Net Interop' option on the component for that .dll is supposed to do it, but it doesn't... not with this .dll at least. After installing I still need to run RegAsm from the command line. I've tried to make a custom action to register the assembly, but it always throws the error:

Error 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: Reg_IEOMSIS.DLL, location: C:\Program Files\barr\test assembly\, command: C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727\RegAsm.exe "C:\Program Files\barr\test assembly\ieomsis.dll" /codebase
MSI (s) (44:90) [15:22:38:037]: Product: test assembly -- Error 1721.There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: Reg_IEOMSIS.DLL, location: C:\Program Files\barr\test assembly\, command: C:\WINDOWS\Microsoft.Net\Framework\v2.0.50727\RegAsm.exe "C:\Program Files\barr\test assembly\ieomsis.dll" /codebase

Without the CA, I can install the software, and from the command prompt run the exact command (copied directly from the .log from the failed install) and it will work as expected.

How can I find out why this isn't working. The msi log doesn't really give any reason WHY it wouldn't run, just that it wouldn't.

Does anybody know how this is supposed to work?

TIA!
crewsr

mjlarezzo
03-13-2008, 05:06 PM
I have gotten this to work by making both the ".NET COM Interop" and "COM Extract at Build" set to YES