Topshelf enabled windows service won't debug
Asked Answered
C

1

16

Using Visual Studio 2015. Created a windows service project. I'm trying to use topshelf, but can't seem to debug.

Output debug / window says:

Topshelf v3.3.154.0, .NET Framework v4.0.30319.42000 Topshelf.Hosts.ConsoleRunHost Error: 0 : An exception occurred, System.IO.IOException: The operation completed successfully.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.__Error.WinIOError() at System.Console.set_Title(String value) at Topshelf.Hosts.ConsoleRunHost.Run()

For those not familiar with Topshelf: http://docs.topshelf-project.com/en/latest/index.html

Codify answered 17/2, 2016 at 21:46 Comment(0)
C
47

Appears Topshelf expects the output type be set to "Console Application."

Project Properties/Application/Output Type: Console Application.

I guess I missed the key concept which is to create a console application which enables you to install it as a windows service.

Codify answered 17/2, 2016 at 21:50 Comment(2)
This really helped me in a bind. Thanks for posting your solution!Thermotensile
Super easy fix. thanks for taking the time to answer this question. 🙌Towhee

© 2022 - 2024 — McMap. All rights reserved.