Configuration Manager
-
- NewLounger
- Posts: 3
- Joined: 08 Jun 2011, 17:58
Configuration Manager
When building a service in C# in visual studio 2010, is there anyway to get around the following error? Normally it is because the lack of an assembly reference(using System.Configuration). In this case it is because it is an application where a service is to be installed. The class is partial class Service1 : ServiceBase. Error: The name configuration manager does not exist in this context
-
- Administrator
- Posts: 78568
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Configuration Manager
Welcome to Eileen's Lounge!
Right-click the project and select Add Reference... from the context menu.
In the .NET tab, find and select the "System.Configuration" component name and click OK.
Right-click the project and select Add Reference... from the context menu.
In the .NET tab, find and select the "System.Configuration" component name and click OK.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 3
- Joined: 08 Jun 2011, 17:58
Re: Configuration Manager
Thank you, that fixed the error. When I right-click the setup project to install the service, the feature is not available, do you know why this is? I have a primary output there which is active.
-
- Administrator
- Posts: 78568
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Configuration Manager
I'm sorry, I don't know anything about C#, I found my previous reply by Googling...
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 3
- Joined: 08 Jun 2011, 17:58
Re: Configuration Manager
I was able to install the service using this website: Walkthrough: Creating a Windows Service Application in the Component Designer.
After installing and starting the service I got the following Error 1053: The service did not respond to the start control request in a timely fashion.
Any ideas? Assuming a solution is found, does everything need to be rebuilt and reinstalled or just saved?
After installing and starting the service I got the following Error 1053: The service did not respond to the start control request in a timely fashion.
Any ideas? Assuming a solution is found, does everything need to be rebuilt and reinstalled or just saved?
Last edited by HansV on 01 Jul 2011, 18:21, edited 1 time in total.
Reason: to correct non-working link
Reason: to correct non-working link
-
- Administrator
- Posts: 78568
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Configuration Manager
Perhaps someone will come up with a suggestion, but don't hold your breath. We don't have many C# or .NET experts - the focus is more on VBA.
Best wishes,
Hans
Hans