title: VS 2010 Error Generating Unit Tests
body: <p>I have one .NET 4 DLL for which I'm having trouble generating unit tests.  I'm using VS 2010 Standard.  Every other project in the solution will generate unit test stubs for classes just fine.  For the other assemblies, I can go into the existing code, right click the class name, and select "Create Unit Tests".  I get the selection window that follows just fine.</p>
  
  <p>The one assembly that I really need to get some coverage on won't generate the test stubs using the same methodology mentioned above.  I go to a class in the project/assembly, right click, select "Generate Unit Tests", and I'm met with the following error:</p>
  
  <blockquote>
    <p>Unit Test Generation Error:  The follow error was encountered while reading module 'xx.Core':  Could not resolve type reference:  [System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxx]System.Web.Routing.RouteValueDictionary</p>
  </blockquote>
  
  <p>As far as I can tell, there are no direct references in the project to the framework 2.0 version of System.Web mentioned in the error message.  Searching the directory that contains the project and .CS files with a tool called grepWIN to see if the text for that reference exists in any files yields zero results.  Is it even possible to reference both the 2.0 and 4.0 version of the system.web dll at the same time, and if so, why would you want to do that?</p>
  
  <p>Any ideas on how to get rid of this error message so that I can properly stub out some unit tests?</p>