473,320 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Problems using InstallUtil.exe on my Service

Hi there

I am making a service project in C#, and I'm in the process of writing the installer. I made an installer class by using the "Add Installer" menu-item in the design window of the service, then I configured the properties of the installers

When I run InstallUtil on the executable, it fails with the following message

"An exception occurred while trying to find the installers in the c:\...\obj\debug\MyService.exe assembly
System.Reflection.ReflectionTypeLoadException: One or more of the types in the assembly unable to load
Aborting installation for c:\...\obj\debug\MyService.exe.

This is very weird, because I haven't changed anything manually in the Installer class, so the Installer class is in the assemby and it is public. I checked the generated code and it all seems ok (I compared with code in my .net bible). Still, the utility doesn't find the Installer class

I read some articles on the net, claiming that it could be a version problem. I wouldn't know but I doubt it. I'm running the latest version of InstallUtil (.NET framework 1.1.4322) and I guess the latest C# IDE (7.1.3088). The OS is WinXP Prof./SP1

What could I be doing wrong, or what is going wrong? I can't see any reason. I've added the Installer class from my project at the bottom (comments and non-critical stuff snipped), and also the complete error message

Thank you very much for any help
Tom Tempelaere

<code
using System
using System.Collections
using System.ComponentModel
using System.Configuration.Install

namespace MyServiceNamespac

[RunInstaller(true)
public class ProjectInstaller : System.Configuration.Install.Installe

private System.ServiceProcess.ServiceProcessInstaller serviceProcessInstaller1
private System.ServiceProcess.ServiceInstaller serviceInstaller1
private System.ComponentModel.Container components = null
public ProjectInstaller(

InitializeComponent()

protected override void Dispose( bool disposing

[SNIPPED

private void InitializeComponent(

this.serviceProcessInstaller1 = new System.ServiceProcess.ServiceProcessInstaller()
this.serviceInstaller1 = new System.ServiceProcess.ServiceInstaller()
this.serviceProcessInstaller1.Password = null
this.serviceProcessInstaller1.Username = null
this.Installers.AddRange( new System.Configuration.Install.Installer[]
this.serviceProcessInstaller1, this.serviceInstaller1} )

</code><complete_error_message
Microsoft (R) .NET Framework Installation utility Version 1.1.4322.57
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved

Running a transacted installation

Beginning the Install phase of the installation
See the contents of the log file for the c:\...\debug\MyService.exe assembly's progress
The file is located at c:\...\obj\debug\MyService.InstallLog
Installing assembly 'c:\...\obj\debug\MyService.exe'
Affected parameters are
assemblypath = c:\...\obj\debug\MyService.ex
logfile = c:\...\obj\debug\MyService.InstallLo
An exception occurred while trying to find the installers in the c:\...\debug\MyService.exe assembly
System.Reflection.ReflectionTypeLoadException: One or more of the types in the assembly unable to load
Aborting installation for c:\...\obj\debug\MyService.exe

An exception occurred during the Install phase
System.InvalidOperationException: Unable to get installer types in the c:\...\obj\debug\MyService.exe assembly
The inner exception System.Reflection.ReflectionTypeLoadException was thrown with the following error message: One or more of the types in the assembly unable to load.

The Rollback phase of the installation is beginning
See the contents of the log file for the c:\...\obj\debug\MyService.exe assembly's progress
The file is located at c:\...\obj\debug\MyService.InstallLog
Rolling back assembly 'c:\...\obj\debug\MyService.exe'
Affected parameters are
assemblypath = c:\...\obj\debug\MyService.ex
logfile = c:\...\obj\debug\MyService.InstallLo
An exception occurred while trying to find the installers in the c:\...\obj\debug\MyService.exe assembly
System.Reflection.ReflectionTypeLoadException: One or more of the types in the assembly unable to load.
Aborting installation for c:\...\obj\debug\MyService.exe.
An exception occurred during the Rollback phase of the System.Configuration.Install.AssemblyInstaller installer.
System.InvalidOperationException: Unable to get installer types in the c:\...\obj\debug\MyService.exe assembly.
The inner exception System.Reflection.ReflectionTypeLoadException was thrown with the following error message: One or more of the types in the assembly unable to load..
An exception occurred during the Rollback phase of the installation. This exception will be ignored and the rollback will continue. However, the machine might not fully revert to its initial state after the rollback is complete.

The Rollback phase completed successfully.

The transacted install has completed.
The installation failed, and the rollback has been performed.
</complete_error_message>
Nov 16 '05 #1
5 13202
Hi ppl

This is just plain ridiculous. I made a quick try-out service project in C#, and added the installer. Installing works great now, however there is nothing obviously different. I smell a bug in here. If I come to a conclusion I'll post it here

Other suggestions are still welcome

Thanks
Tom.
Nov 16 '05 #2
Hi

I've described a way to reproduce the problem in another post: "Service Problem, InstallUtil fails. I'm stuck ..." (7 apr. 04

Thanks
Tom.
Nov 16 '05 #3
Hi

I've described a way to reproduce the problem in another post: "Service Problem, InstallUtil fails. I'm stuck ..." (7 apr. 04

Thanks
Tom.
Nov 16 '05 #4
I just got this error and have been going nuts with it. Now what exactly did you do?

Aaron Abend
800-288-5383 x606

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Nov 16 '05 #5
I am getting the same error. What exactly did you do? Any help appreciated.

---
Posted using Wimdows.net NntpNews Component -

Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: TT (Tom Tempelaere) | last post by:
Hi there I am making a service project in C#, and I'm in the process of writing the installer. I made an installer class by using the "Add Installer" menu-item in the design window of the service,...
7
by: scarred wind | last post by:
when i run my program, an error message prompt me that i should add the installutil.exe. How do i checked for the installutil.exe? How can i add it to my Timer program? ...
9
by: shaddock | last post by:
Hello, When trying to run the InstallUtil.exe, I get the error below. Any insights? 'installutil' is not recognized as an internal or external command, operable program or batch file. ...
4
by: Claire | last post by:
Hi, I know this isn't strictly C# language related, but my service IS written in c# and I checked out the list of microsoft newsgroups for win2000 and couldn't really see one that applies. I'm...
0
by: Claire | last post by:
Ive built a service using visual studio c#. I'm trying to install the service on a win 2000 server machine using installutil.exe logged in as administrator. We get no errors from installutil, or...
3
by: Rob Meade | last post by:
Hi all, I've just followed an article regarding the creation of a windows service - so far so good - right up until I try to do the install... I get the following error message in the command...
2
by: tshad | last post by:
I have been running into all kinds of problems with VS2003 and handling Windows services. One of the main problems is trying to uninstall services. It doesn't work half the time. Mainly it...
5
by: Jamin Mace | last post by:
I'm trying to create a batch script that will allow me to use the .Net installutil.exe to install a windows service. I want to be able to specify the username and pasword in my script so that I...
11
by: kshetgar | last post by:
I am experiencing a wierd problem... I have a C#.Net application Server which uses Sockets. It listens on port 11000. and it runs as a Windows Service. If I run it as a consple Application,...
4
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi all, I continue with installation. I create three windows services. Each service has a Installer class.
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.