Assembly unable to load during windows service installation

Posted on 2007-03-19
Last Modified: 2013-12-17
I have a windows service created in 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.

Question by:nicksbell
  • 5
  • 4
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.

Author Comment

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 that what you meant?
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.

Author Comment

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.
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.


Author Comment

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.
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.

Author Comment

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.
LVL 23

Accepted Solution

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.

Author Comment

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.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization ( and XML Serialization ( In this article we will try to know more about SOAP (Simple Object Acces…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK ( for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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

15 Experts available now in Live!

Get 1:1 Help Now