title: Detect calling project type in a .net class library
body: <p>I'va generated a class library in Dotnet.
  Now I have linked this library in various Clients, a console program, a service, am unit test project and a ASP.NET website.
  In some parts I need to load certain files (i.e. Excel templates) from disk. In this case the location for the different caller projects is different.</p>
  
  <p>So my question is: What is the best way to find out, which project type is currently using my library?</p>
  
  <p>Detecting the website client is easy, I just need to check if If System.Web.HttpContext.Current is not Nothing. But what about detecting the other clients?</p>