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\debu g\MyService.exe assembly
System.Reflecti on.ReflectionTy peLoadException : One or more of the types in the assembly unable to load
Aborting installation for c:\...\obj\debu g\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.Collecti ons
using System.Componen tModel
using System.Configur ation.Install
namespace MyServiceNamesp ac
[RunInstaller(tr ue)
public class ProjectInstalle r : System.Configur ation.Install.I nstalle
private System.ServiceP rocess.ServiceP rocessInstaller serviceProcessI nstaller1
private System.ServiceP rocess.ServiceI nstaller serviceInstalle r1
private System.Componen tModel.Containe r components = null
public ProjectInstalle r(
InitializeCompo nent()
protected override void Dispose( bool disposing
[SNIPPED
private void InitializeCompo nent(
this.servicePro cessInstaller1 = new System.ServiceP rocess.ServiceP rocessInstaller ()
this.serviceIns taller1 = new System.ServiceP rocess.ServiceI nstaller()
this.servicePro cessInstaller1. Password = null
this.servicePro cessInstaller1. Username = null
this.Installers .AddRange( new System.Configur ation.Install.I nstaller[]
this.servicePro cessInstaller1, this.serviceIns taller1} )
</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\My Service.exe assembly's progress
The file is located at c:\...\obj\debu g\MyService.Ins tallLog
Installing assembly 'c:\...\obj\deb ug\MyService.ex e'
Affected parameters are
assemblypath = c:\...\obj\debu g\MyService.ex
logfile = c:\...\obj\debu g\MyService.Ins tallLo
An exception occurred while trying to find the installers in the c:\...\debug\My Service.exe assembly
System.Reflecti on.ReflectionTy peLoadException : One or more of the types in the assembly unable to load
Aborting installation for c:\...\obj\debu g\MyService.exe
An exception occurred during the Install phase
System.InvalidO perationExcepti on: Unable to get installer types in the c:\...\obj\debu g\MyService.exe assembly
The inner exception System.Reflecti on.ReflectionTy peLoadException 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\debu g\MyService.exe assembly's progress
The file is located at c:\...\obj\debu g\MyService.Ins tallLog
Rolling back assembly 'c:\...\obj\deb ug\MyService.ex e'
Affected parameters are
assemblypath = c:\...\obj\debu g\MyService.ex
logfile = c:\...\obj\debu g\MyService.Ins tallLo
An exception occurred while trying to find the installers in the c:\...\obj\debu g\MyService.exe assembly
System.Reflecti on.ReflectionTy peLoadException : One or more of the types in the assembly unable to load.
Aborting installation for c:\...\obj\debu g\MyService.exe .
An exception occurred during the Rollback phase of the System.Configur ation.Install.A ssemblyInstalle r installer.
System.InvalidO perationExcepti on: Unable to get installer types in the c:\...\obj\debu g\MyService.exe assembly.
The inner exception System.Reflecti on.ReflectionTy peLoadException 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 13300
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, 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...
|
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?
----------------------------------------------
when you fear to fail, you fear something that
has not yet happened.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
|
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.
Thanks
|
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 trying to test my service on a remote win2000 server machine, accessing
the machine as user "administrator" on remote desktop. Im just at the
install stage and using the installutil.exe to register the service on the
server.
The install appears to...
|
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 in event log, but when we go into the services list it's not
listed.
Doing a search through the registry, there's no sign of it there either.
Dot net is installed, the application runs fine when the important bits are
extracted and compiled into a...
| |
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 prompt:
Exception occurred while initializing the installation:
System.IO.FileNotFoundException: File or assembly name Documents, or one of
its
|
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 seems that is the case if you you try to change
the service name (which it wants to force as Service1). If you change the
name, it installs OK and sort of works. But if you try to uninstall it, it
says you are missing something.
C:\Documents and...
|
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 don't get prompted. Here is
an example of my script. No matter what I still get prompted. Does anyone
have any Ideas?
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\installUtil.exe
C:\Projects\myservice\bin\myservice.exe...
|
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, I can connect to that
port/Application from any machine on the network as well as from my
local machine.
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |