Page 1 of 3
register assembly not working
Posted: Tue Jan 11, 2011 2:12 pm
by SteveRing
I'm using installaware 10 and am installing some assemblies into the GAC. I've checked the regasm box in the assembly view. But, the assemblies don't get registered. I can register them by hand after the install. What else do I need to do, or what else could be causing them to not register?
Re: register assembly not working
Posted: Tue Jan 11, 2011 2:36 pm
by giaviv
Dear SteveRing,
How exactly are you registering your assemblies?
Thanks
Re: register assembly not working
Posted: Tue Jan 11, 2011 2:47 pm
by SteveRing
I just clicked "register assembly" in the design->assembly view. This inserted some register assembly lines into my msi code. Here's a copy of one of the lines. The version number and public key are correct.
~InstallAware Clipboard Data~
~Register Assembly~
~{8EDE7848-7E4E-4048-8094-E8FF3190983D}~
~SinapsXNet, Version=1.0.4020.30069, Culture=neutral, PublicKeyToken=04b2a01e84073963|TRUE|FALSE~
Re: register assembly not working
Posted: Tue Jan 11, 2011 2:48 pm
by SteveRing
Also, they are .net 4.0 assemblies, if that makes any difference.
Re: register assembly not working
Posted: Tue Jan 11, 2011 2:54 pm
by giaviv
Dear SteveRing,
Is it possible that you did not call "Apply Install" in your MSIcode (are you even using MSIcode or are you just using the designer)? Is it possible that the assemblies are not valid (do they install successfully outside of IA)?
Thanks
Re: register assembly not working
Posted: Tue Jan 11, 2011 3:32 pm
by SteveRing
Apply install is called just before the lines registering the assembly. The assemblies register fine after the install. I open a command window and go to the required assembly folders and use regasm.
Should the register assembly lines go before the apply install?
Apply Install (get result into variable SUCCESS)
if Variable SUCCESS not Equals ERROR
if Variable SUCCESS not Equals CANCEL
Register assembly ezxyDll, Version=1.0.4023.27005, Culture=neutral, PublicKeyToken=9d8fed7363cefb54
Register assembly SinapsXNet, Version=1.0.4020.30069, Culture=neutral, PublicKeyToken=04b2a01e84073963
Re: register assembly not working
Posted: Tue Jan 11, 2011 3:47 pm
by giaviv
Dear SteveRing,
You indeed need to call Apply Install after registering your assemblies. IA caches your commands and doesn't actually run them until Apply Install/Changes is called.
Please let me know if that solved your problem!
Re: register assembly not working
Posted: Tue Jan 11, 2011 4:23 pm
by SteveRing
That didn't work. The code now looks like:
Install Assembly P:\projects\ezxy 5.4\Release\ezxyDll.dll to Global Assembly Cache
Install Assembly P:\projects\ezxy 5.4\Release\SinapsXNet.dll to Global Assembly Cache
Register assembly ezxyDll, Version=1.0.4023.27005, Culture=neutral, PublicKeyToken=9d8fed7363cefb54
Register assembly SinapsXNet, Version=1.0.4020.30069, Culture=neutral, PublicKeyToken=04b2a01e84073963
Apply Install (get result into variable SUCCESS)
But, the assemblies still don't get registered.
Re: register assembly not working
Posted: Wed Jan 12, 2011 2:55 am
by giaviv
Dear SteveRing,
Could you send your project and the assemblies you are trying to register to support at installaware.com?
I will look at them and try to pin down the problem.
Thanks
Re: register assembly not working
Posted: Wed Jan 12, 2011 10:22 am
by SteveRing
A zip file with one of the assemblies and the installer project files was just sent
Re: register assembly not working
Posted: Wed Jan 12, 2011 11:59 am
by giaviv
Dear SteveRing,
I tried registering your assembly with regasm but was unsuccessful - I got the following error:
RegAsm : error RA0000 : Failed to load 'assembly.dll' because it is not a valid .NET assembly
Any idea on why is that happening?
Thanks
Re: register assembly not working
Posted: Wed Jan 12, 2011 12:32 pm
by SteveRing
you probably need the vs2010 runtime libs installed, as it needs msvcr100.dll and msvcp100.dll. I can send you the installer for this if necessary.
Re: register assembly not working
Posted: Wed Jan 12, 2011 12:38 pm
by giaviv
Hey SteveRing,
I had to install .Net framework 4 for the assembly to register.. Are you sure that you have .Net for installed on the installation machine? What makes you think that your assemblies don't get registered?
Thanks!
Re: register assembly not working
Posted: Wed Jan 12, 2011 1:30 pm
by SteveRing
I have .net 4.0 installed. If I didn't the main application wouldn't even run. I know that it isn't registered because I can't create and use the object from vb in excel. Once I register it by hand, I can. The vb code that I'm using in excel is below.
Dim reader As Object
Dim labelStart As String
Dim valueStart As String
Dim dataStart As String
Dim stat As Long
Dim dVals As Variant
Sub initReader()
If didInit = False Then
Set reader = CreateObject("SinapsXNet.SindaPlotting")
stat = reader.reopen("P:\projects\Sinaps2\models\Samples\cplgas\base.sav", "PC")
dVals = reader.getTimeDataFor("T", "PLATE", 11)
End If
End Sub
Re: register assembly not working
Posted: Wed Jan 12, 2011 2:23 pm
by giaviv
SteveRing,
I tried registering the assembly you sent us with .net 4.0's regasm.exe and received a message:
"Types registered successfully"
I then ran the VB code you sent me and received this run-time error (on the CreateObject line):
"The system cannot find the file specified."
Could it be that the name of the assembly is wrong?