473,748 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"Unable to create an instance of the [my installer class] installer type --> Exceptio

1 New Member
I am unable to install my windows service and the installutil is throwing the following error:

Running a transacted installation.

Beginning the Install phase of the installation.
See the contents of the log file for the d:\practice in .net\mywindowss ervice\mywindow sservice\mywind owsservice\bin\ practiceservice .exe assembly's progress.
The file is located at d:\practice in .net\mywindowss ervice\mywindow sservice\mywind owsservice\bin\ practiceservice .InstallLog.

An exception occurred during the Install phase.
System.InvalidO perationExcepti on: Unable to create an instance of the MyWindowsServic e.ServiceInstal l installer type.
The inner exception System.Reflecti on.TargetInvoca tionException was thrown with the following error message: Exception has been thrown by the target of an invocation..
The inner exception System.NullRefe renceException was thrown with the following error message: Object reference not set to an instance of an object..

The Rollback phase of the installation is beginning.
See the contents of the log file for the d:\practice in .net\mywindowss ervice\mywindow sservice\mywind owsservice\bin\ practiceservice .exe assembly's progress.
The file is located at d:\practice in .net\mywindowss ervice\mywindow sservice\mywind owsservice\bin\ practiceservice .InstallLog.
An exception occurred during the Rollback phase of the System.Configur ation.Install.A ssemblyInstalle r installer.
System.InvalidO perationExcepti on: Unable to create an instance of the MyWindowsServic e.ServiceInstal l installer type.
The inner exception System.Reflecti on.TargetInvoca tionException was thrown with the following error message: Exception has been thrown by the target of an invocation..
The inner exception System.NullRefe renceException was thrown with the following error message: Object reference not set to an instance of an object..
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.


"ServiceInstall " is the class prepared to install the service in my project.

I dont know what is the process .NET uses for instatiating this class for installation but the Visual Studio's auto generated code, automatically created an instance by Mybase.New(), then how this it is not being instantiated.

I dont know where to strike.
Please help me out.


Attaching the code snippet which i used to prepare the installer:

<System.Diagnos tics.DebuggerSt epThrough()> Private Sub InitializeCompo nent()

components = New System.Componen tModel.Containe r
components = Nothing

InstallerServic e = New System.ServiceP rocess.ServiceP rocessInstaller
InstallerForSer vice = New System.ServiceP rocess.ServiceI nstaller
Try

ErrorLogger = New ErrorLogging

InstallerServic e.Account = ServiceAccount. LocalSystem
InstallerServic e.Username = Nothing
InstallerServic e.Password = Nothing
'InstallerServi ce.Context.LogM essage("Service being installed in machine" + System.Environm ent.MachineName ())


InstallerForSer vice.StartType = ServiceStartMod e.Automatic
InstallerForSer vice.ServiceNam e = "PracticeServic e"
InstallerForSer vice.DisplayNam e = "Practice Service"

'InstallerColle ct.Add(Installe rService)
'InstallerColle ct.Add(Installe rForService)

Me.Installers.A ddRange(New System.Configur ation.Install.I nstaller() {Me.InstallerSe rvice, Me.InstallerFor Service})
ErrorLogger.Log ErrorData("Prac ticeService", "Service being installed in machine" + System.Environm ent.MachineName ())

Catch ex As Exception
ErrorLogger.Log ErrorData("Inst allation", ex.Message)
End Try


End Sub

Thanks
Ashish Jain
Jan 30 '07 #1
2 12841
sbuchanan
2 New Member
Afraid I don't have an answer to your 4 year old problem but do have the same issue. In my case it is with a service which was previously installing fine in VS2008 but, now that I have converted the solution to VS2010 its causing the same log output and exceptions that you have listed.
Feb 4 '11 #2
sbuchanan
2 New Member
Turns out that it was because of an incorrectly named config file.
Feb 4 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

10
2025
by: Whitney Kew | last post by:
Hello, I have a question regarding type conversion operators. Let's say I have a simple (nonsensical) class as follows: class MakeNewInt { private: int* _n;
1
2442
by: Bjoern | last post by:
I have a name of a class and the corresponding assembly. Now I want to create an object of this class. I think it is should work with Reflection. But I don't know how exactly. Could someone post a little sample in C# code. Thanks in advance, Bjoern
3
1713
by: Mark Assousa | last post by:
Hi, I'm having trouble finding the right news group for this posting so here goes... I am attempting to execute some special actions within an installation project for a standard .Net Windows application. I have a custom Installer class that needs to access a disk file installed during the installation in a directory relative to the application directory. The file name is known but I don't know how to access the target
5
1990
by: mlev | last post by:
I want function in one namespace to create instance of class defined in another namespace. (more detailed - I try to make independent "Seralizer" dll, to be used by different application, each calling it from its own class which defines the application configuration) I failed to make it work. Notify that in the Seralizer source I dont know the definition of the class I get. Foe example, how do I make lines like below working? public...
2
2106
by: =?Utf-8?B?T2xkQnV0U3RpbGxMZWFybmluZw==?= | last post by:
I want create an instance of an object which accepts a Data Reader as a constructor. I realize that I could create a gigantic case statement in which I test for each text name, but that case statement would be rather larger and I would have to revise as new classes are added or removed. Another variable will tell me the namespace that I will find the class in. So I would have a case statement which would evaluate the variable for...
0
1395
by: mkadasi | last post by:
I want to dynamically create instance of class stored in other application. I am writing the following code for this purpose: Here in the AssemblyFunc() I am loading the assembly of TariffClass application which is loaded successfully. In objectCreate() I am creating object of class present in TariffClass application. But I am getting the following error 'Could not load file or assembly 'file:///C:\Inetpub\wwwroot\QuickQuote\TariffClass,...
3
1294
by: =?Utf-8?B?Sm9uIEphY29icw==?= | last post by:
In the install event, I need to show the user a list of SQL Servers visible to the machine (getting the list is no problem) so the user can multiselect which servers apply. Some other UI stuff as well. How can I do this? Thanks,
1
1480
by: gayane | last post by:
Hi everone I have myobject of type object and i want to create instance of its real type. All types are standart types. From myobject.getType() and can get its type. But how to create instance ? If anyone know, please write an answer. Thanks
1
4171
by: yogita1107 | last post by:
I have a setup project in Visual Studio 2008 with Custom Action class. I have to execute the msi on command line using msiexec /i SetupProject.msi /qb /l* out.txt command. The task is to write custom messages to the log file. This can be done by MsiProcessMessage function from Windows Installer API. To achieve this I have downloaded the C# wrapper class posted on CodeProject.com (http://www.codeproject.com/csharp/msiinterop.asp) that provides a...
0
8983
marktang
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...
0
9359
jinu1996
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...
1
9310
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9236
tracyyun
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...
0
8235
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6792
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6072
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();...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3298
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 we have to send another system

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.