Topshelf - Type or namespace name Topshelf cannot be found
Asked Answered
A

2

5

I am attempting to play with Topshelf to host a Console application as a Windows Service, but I am running into problems...

I have referenced the Topshelf dll, along with the log4net dll from my Console application. However, when I compile - either with or without code that references Topshelf, the build error mentioned in the title is displayed, and then my Topshelf reference becomes invalidated (and log4net too).

I feel like I am missing something obvious - any suggestions would be appreciated.

Agaric answered 2/5, 2011 at 18:40 Comment(1)
I think its likely there's another assembly you're missing.Consols
P
11

Change the project to target .NET 4.0 instead of .NET 4.0 Client Profile. Topshelf references System.Web for the inprocess dashboard.

Pursuer answered 2/5, 2011 at 21:27 Comment(1)
Travis, I was just coming back to update my own question after I discovered this also - you hit the nail on the head. Thank you!Agaric
I
0

you can use Nuget for install topshelf on your project

TopShelf Install

on VisualStudio go to Tools/Nuget Pakage Manager/Pakage manager Console

Inexhaustible answered 10/1, 2019 at 4:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.