473,473 Members | 2,185 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

The type or namespace 'Installer' does not exist in the class or namespace 'System.Configuration'

I get the above error message as well as a complaint about the
RunInstallerAttribute not being found when compiling the following code.
This couldn't be any simpler and I see examples on the web that use this
namespace and this attribute. I am using VS.Net 2003. Any ideas?

using System;
using System.ServiceProcess;
using System.Configuration.Installer;

namespace POP3Retriever
{
[RunInstallerAttribute(true)]
public class ProjectInstaller : System.ServiceProcess.ServiceInstaller
{
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalSystem;
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "POP3 retriever";
si.StartType = ServiceStartMode.Manual;
Installers.AddRange(new Installer[] {spi, si});
}
}
}
Nov 18 '05 #1
2 3203
Sorry, here is the actual code. The previous version was from me trying to
get it to work. It actually complains that Install is not a type or
namespace in System.Configuration.

using System;
using System.ServiceProcess;
using System.Configuration.Install;

namespace POP3Retriever
{
[RunInstallerAttribute(true)]
public class ProjectInstaller : System.ServiceProcess.ServiceInstaller
{
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalSystem;
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "POP3 retriever";
si.StartType = ServiceStartMode.Manual;
Installers.AddRange(new Installer[] {spi, si});
}
}
}

"John Chrisman" <j.********@comcast.net> wrote in message
news:9O********************@comcast.com...
I get the above error message as well as a complaint about the
RunInstallerAttribute not being found when compiling the following code.
This couldn't be any simpler and I see examples on the web that use this
namespace and this attribute. I am using VS.Net 2003. Any ideas?

using System;
using System.ServiceProcess;
using System.Configuration.Installer;

namespace POP3Retriever
{
[RunInstallerAttribute(true)]
public class ProjectInstaller : System.ServiceProcess.ServiceInstaller
{
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalSystem;
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "POP3 retriever";
si.StartType = ServiceStartMode.Manual;
Installers.AddRange(new Installer[] {spi, si});
}
}
}

Nov 18 '05 #2
OK, solved it myself. It never fails that the minute I give up on something
and ask for help I realize the solution. This is the first time I've had to
add a reference to anything that is in the System namespace. I assumed
everything in the System namespace was already referenced.

"John Chrisman" <j.********@comcast.net> wrote in message
news:Q7********************@comcast.com...
Sorry, here is the actual code. The previous version was from me trying to
get it to work. It actually complains that Install is not a type or
namespace in System.Configuration.

using System;
using System.ServiceProcess;
using System.Configuration.Install;

namespace POP3Retriever
{
[RunInstallerAttribute(true)]
public class ProjectInstaller : System.ServiceProcess.ServiceInstaller
{
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalSystem;
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "POP3 retriever";
si.StartType = ServiceStartMode.Manual;
Installers.AddRange(new Installer[] {spi, si});
}
}
}

"John Chrisman" <j.********@comcast.net> wrote in message
news:9O********************@comcast.com...
I get the above error message as well as a complaint about the
RunInstallerAttribute not being found when compiling the following code.
This couldn't be any simpler and I see examples on the web that use this
namespace and this attribute. I am using VS.Net 2003. Any ideas?

using System;
using System.ServiceProcess;
using System.Configuration.Installer;

namespace POP3Retriever
{
[RunInstallerAttribute(true)]
public class ProjectInstaller : System.ServiceProcess.ServiceInstaller {
public ProjectInstaller()
{
ServiceProcessInstaller spi = new ServiceProcessInstaller();
spi.Account = ServiceAccount.LocalSystem;
ServiceInstaller si = new ServiceInstaller();
si.ServiceName = "POP3 retriever";
si.StartType = ServiceStartMode.Manual;
Installers.AddRange(new Installer[] {spi, si});
}
}
}


Nov 18 '05 #3

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

Similar topics

1
by: Craig | last post by:
I have added a 'Textboxes (A)' to my UI installer project along with a custom action to pass the value back to a class I've written to override the void Install function. As long as the text is...
0
by: Tressa | last post by:
Sorry to be such a novice about this but..... I have a windows service. It contains two separate files. Both have the same namespace name. I need to pass "bDisplay" into the other file. I am...
3
by: Brian Henry | last post by:
This has worked perfectly for the past year now all the sudden it will not compile the installer project correctly. All our source code is in a Source Safe database so every system we do this on...
3
by: DC Gringo | last post by:
Hi, I'm trying to use a custom action to modify a database (rather than create one) using the VS.NET '03's help example called "Custom Action to Create Database During Installation". I've made...
2
by: AnalogKid17 | last post by:
Keywords: ASP.NET app with VS2005 running on Win2003 with IIS6, and SQL2000 on a WinXP Box I've betting the following for days... it's driving me insane: Server Error in '/' Application. ...
1
by: Sky | last post by:
Yesterday I was told that GetType(string) should not just be with a Type, but be Type, AssemblyName. Fair enough, get the reason. (Finally!). As long as it doesn't cause tech support problems...
2
by: ashishjainism | last post by:
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...
5
by: Alias | last post by:
Hi - I'm trying to implement a custom RoleProvider based on the SqlRoleProvider. I keep receiving a an error that it can't load type 'MyRoleTest.MyRoleProvider' when trying to load my...
3
by: Whooty | last post by:
Hello, im kind of new in using C++ and I have a question, I tried some tutorials and eventualy came to the part where the system namespace is used, but for some reason it won't work, #include...
0
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...
0
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,...
0
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...
0
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...
1
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...
0
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,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 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.