title: A project with output type of class library cannot be started directly - with a startup exe
body: <p>Firstly I'm completely aware of this message and why it happens normally. It's not that I'm just trying to run a dll (like <a href="https://stackoverflow.com/questions/618622/framework-give-me-error-about-cannot-started-directly">this question</a>).</p>
  
  <p>I have a project that compiles to a dll but has a startup program specified in the project properties. Most of the time I'm able to right-click on the project and select Debug > Start new instance, and it will run the program and let me debug my dll. However, occasionally I get this message (A project with output type of class library cannot be started directly) as if I haven't got a startup program. The first few times I thought it was just me accidentally clicking on the wrong project but I'm certain this isn't the case given that it's happened so many times and I've been careful to watch it. </p>
  
  <p>When this message appears I'm able to try it again and it always works on the second or third attempt.</p>
  
  <p>A colleague using the same Solution never has this problem :-/</p>
  
  <p>Anyone else had this problem or know how to solve it?</p>
  
  <p>I'm using Visual Studio 2005 Pro Version 8.0.50727.762  (SP.050727-7600)
  <strong>Edit</strong>: Also happens with Visual Studio 2010</p>