Solved

Assembly unable to load during windows service installation

Posted on 2007-03-19
9
702 Views
Last Modified: 2013-12-17
I have a windows service created in VB.net and I am trying to create a setup project to install it.  When I run the install program I get the following error message:

Unable to get the installer types in the <...> assembly. --> One or more of the types in the assembly unable to load.

Is there any way to find out which assembly is causing the problem.  The install works fine on another machine.  Can anyone suggest why this might be happening.

Thanks
0
Comment
Question by:nicksbell
  • 5
  • 4
9 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 18750254
Your assembly module that contains those types is not where you expect it to be.  Check which directory the install thinks it's in, then physically check your system to verify that the assembly is in fact in that location.  If it is, we'll see if we can find something else to check.
0
 
LVL 2

Author Comment

by:nicksbell
ID: 18750435
Well I am not entirely sure I understand what you are saying, my problem (I think) is identifying which 'types' we are talking about.  I have checked all of the dependencies in my setup project and they all point to valid locations for the source files....is that what you meant?
0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 18751115
Not the source files.  At run-time, your source files are just a bunch of text (these aren't VBScript files, after all).  The types are contained in DLLs and EXEs that must be loaded and referenced at runtime.  We also call these "types" CLASSES.
0
 
LVL 2

Author Comment

by:nicksbell
ID: 18751763
Sorry, when I said source files, I meant the orginal references to DLLs in the underlying project....not the 'source' as in code files.  What I meant was that the dependencies shown in the setup project relate to the DLLs that are referenced by the primary output project.  The locations of these DLLs are all valid.

Incidentally, the whole solution, including the setup  project compiles without a problem.  The problem arises when I try to run the setup.exe file.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 2

Author Comment

by:nicksbell
ID: 18765161
I have run msiexec /l*v from the command line and the area in the log file where the error is is as follows:

MSI (s) (C4:54) [11:32:33:230]: Executing op: FileCopy(SourceName=NEMOS_~4.DLL|nemos_RemoteServer.dll,SourceCabKey=_DF1B5F0694AECA3C6EC2506D8E535827,DestName=nemos_RemoteServer.dll,Attributes=512,FileSize=17920,PerTick=32768,,VerifyMedia=1,,,,,CheckCRC=0,Version=1.0.2636.17472,Language=0,InstallMode=58982400,,,,,,,)
MSI (s) (C4:54) [11:32:33:230]: File: C:\Program Files\FundSolve Ltd\AutoCalcSetup\nemos_RemoteServer.dll;      To be installed;      Won't patch;      No existing file
MSI (s) (C4:54) [11:32:33:230]: Source for file '_DF1B5F0694AECA3C6EC2506D8E535827' is compressed
InstallFiles: File: nemos_RemoteServer.dll,  Directory: C:\Program Files\FundSolve Ltd\AutoCalcSetup\,  Size: 17920
MSI (s) (C4:54) [11:32:33:480]: Note: 1: 2318 2: C:\Program Files\FundSolve Ltd\AutoCalcSetup\nemos_RemoteServer.dll
MSI (s) (C4:54) [11:32:33:902]: Executing op: CacheSizeFlush(,)
MSI (s) (C4:54) [11:32:33:902]: Executing op: InstallProtectedFiles(AllowUI=1)
MSI (s) (C4:54) [11:32:33:902]: Executing op: ActionStart(Name=_42B0858D_0656_415E_A005_6AAD464BF28B.commit,,)
Action 11:32:33: _42B0858D_0656_415E_A005_6AAD464BF28B.commit.
MSI (s) (C4:54) [11:32:33:902]: Executing op: CustomActionSchedule(Action=_42B0858D_0656_415E_A005_6AAD464BF28B.commit,ActionType=1537,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=commit /LogFile= "C:\Program Files\FundSolve Ltd\AutoCalcSetup\nemos_AutoCalcService.exe" "C:\DOCUME~1\ADMINI~1.DAT\LOCALS~1\Temp\CFG51.tmp")
MSI (s) (C4:54) [11:32:33:902]: Executing op: ActionStart(Name=_4B9E3141_0D84_4D5A_BB6F_4E6AA9B0210F.rollback,,)
Action 11:32:33: _4B9E3141_0D84_4D5A_BB6F_4E6AA9B0210F.rollback.
MSI (s) (C4:54) [11:32:33:902]: Executing op: CustomActionSchedule(Action=_4B9E3141_0D84_4D5A_BB6F_4E6AA9B0210F.rollback,ActionType=1281,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=rollback /LogFile= "C:\Program Files\FundSolve Ltd\AutoCalcSetup\nemos_AutoCalcService.exe" "C:\DOCUME~1\ADMINI~1.DAT\LOCALS~1\Temp\CFG51.tmp")
MSI (s) (C4:54) [11:32:33:902]: Executing op: ActionStart(Name=_97B9AA6E_40BD_4A59_8184_ED44B8A3820F.install,,)
Action 11:32:33: _97B9AA6E_40BD_4A59_8184_ED44B8A3820F.install.
MSI (s) (C4:54) [11:32:33:902]: Executing op: CustomActionSchedule(Action=_97B9AA6E_40BD_4A59_8184_ED44B8A3820F.install,ActionType=1025,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=install /LogFile= "C:\Program Files\FundSolve Ltd\AutoCalcSetup\nemos_AutoCalcService.exe" "C:\DOCUME~1\ADMINI~1.DAT\LOCALS~1\Temp\CFG51.tmp")
MSI (s) (C4:68) [11:32:33:933]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI2B.tmp, Entrypoint: ManagedInstall
MSI (s) (C4!80) [11:32:34:542]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (48:DC) [11:32:34:542]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog,
Error 1001. Unable to get installer types in the c:\program files\fundsolve ltd\autocalcsetup\nemos_autocalcservice.exe assembly. --> One or more of the types in the assembly unable to load.
MSI (s) (C4!80) [11:32:39:308]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (C4!80) [11:32:39:308]:
MSI (s) (C4:68) [11:32:39:308]: Leaked MSIHANDLE (26) of type 790531 for thread 4736
MSI (s) (C4:68) [11:32:39:308]: Note: 1: 2769 2: _97B9AA6E_40BD_4A59_8184_ED44B8A3820F.install 3: 1
MSI (s) (C4:68) [11:32:39:308]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2769:  Custom Action _97B9AA6E_40BD_4A59_8184_ED44B8A3820F.install did not close 1 MSIHANDLEs.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: _97B9AA6E_40BD_4A59_8184_ED44B8A3820F.install, 1,
Action ended 11:32:39: InstallFinalize. Return value 3.
MSI (s) (C4:54) [11:32:39:323]: User policy value 'DisableRollback' is 0
MSI (s) (C4:54) [11:32:39:323]: Machine policy value 'DisableRollback' is 0
MSI (s) (C4:54) [11:32:39:323]: Executing op: Header(Signature=1397708873,Version=301,Timestamp=913660945,LangId=1033,Platform=0,ScriptType=2,ScriptMajorVersion=21,ScriptMinorVersion=4,ScriptAttributes=0)
MSI (s) (C4:54) [11:32:39:323]: Executing op: DialogInfo(Type=0,Argument=1033)
MSI (s) (C4:54) [11:32:39:323]: Executing op: DialogInfo(Type=1,Argument=AutoCalcSetup)
MSI (s) (C4:54) [11:32:39:323]: Executing op: RollbackInfo(,RollbackAction=Rollback,RollbackDescription=Rolling back action:,RollbackTemplate=[1],CleanupAction=RollbackCleanup,CleanupDescription=Removing backup files,CleanupTemplate=File: [1])
Action 11:32:39: Rollback. Rolling back action:


Does this mean anything to you?  Is it possible to identify what the problem is from this.
0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 18765209
What this is telling me is that AutoCalcService.Exe has a dialog in it called ErrorDialog that uses an object type of ErrorIcon that is not available in the .EXE.  It could be a bad name, or it could be that ErrorIcon is a resource that is contained in another DLL or EXE that isn't yet installed (it may be getting installed as a later part of the process).

Does any of this ring any bells with you?  I'm assuming you developed the AutoCalcService.EXE and that you know where and what the ErrorDialog is.
0
 
LVL 2

Author Comment

by:nicksbell
ID: 18765437
Unfortunately not.  There is no reference at all to ErrorDialog or ErrorIcon in any of my code.  The strange thing is this install works on 2 other machines without a problem.  I have tried reinstalling both the .Net Framwork as well as Visual Studio in case some assemblies had got corrupted but to no avail.  I'm really stumped.
0
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 500 total points
ID: 18765913
OK, I figured something out with some research.  The ErrorDialog and ErrorIcon errors are spurious, they simply mean that an error occurred.  The real error was in a custom installation step that is being handled by a routine called ManagedInstall.  Two errors occurred, in fact.  I have no idea what they are since it is your custom installation step, but you may want to debug it very carefully on this new machine.
0
 
LVL 2

Author Comment

by:nicksbell
ID: 18766117
So I removed all references from AutoCalcService.exe and commented out the code that relied on those reference and then added them back one by one until I found the reference that was causing the problem.  Once I found the offending reference I commented out all of the code that depended on that reference and reintroduced the code bit by bit until I found the specific piece of code that was causing the problem.

The unfortunate thing is that the offending piece of code compiles without a problem and debugs in the development environment without a problem....its just when I try to install via the installation package that the error occurs.  The other unfortunate thing is that the reference is to a third party DLL so I guess I now need to get on to them to see if they can suggest a reason why.

Anyway, thanks a lot for your help.  You can have the points for trying.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now