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 13227
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: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
| |