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> 5 13246
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.
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.
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.
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.
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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,...
|
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?
...
|
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.
...
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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,...
|
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.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |