register assembly not working

Got a problem you cannot solve? Try here.
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

register assembly not working

Post 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?
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: register assembly not working

Post by giaviv »

Dear SteveRing,

How exactly are you registering your assemblies?

Thanks
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

Re: register assembly not working

Post 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~
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

Re: register assembly not working

Post by SteveRing »

Also, they are .net 4.0 assemblies, if that makes any difference.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: register assembly not working

Post 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
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

Re: register assembly not working

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: register assembly not working

Post 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!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

Re: register assembly not working

Post 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.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: register assembly not working

Post 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
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

Re: register assembly not working

Post by SteveRing »

A zip file with one of the assemblies and the installer project files was just sent
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: register assembly not working

Post 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
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

Re: register assembly not working

Post 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.
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: register assembly not working

Post 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!
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
SteveRing
Posts: 42
Joined: Wed Jan 13, 2010 3:24 pm
Location: United States

Re: register assembly not working

Post 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
giaviv
Posts: 2039
Joined: Fri Dec 17, 2010 1:39 pm

Re: register assembly not working

Post 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?
Aviv Giladi
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Product Guides - http://www.installaware.com/publication ... guides.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Post Reply