Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Topshelf - Type or namespace name Topshelf cannot be found

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.

like image 907
grefly Avatar asked May 02 '11 18:05

grefly


1 Answers

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

like image 175
Travis Avatar answered Oct 08 '22 19:10

Travis