title: Could not load file or assembly 'System.Web.Mvc
body: <p>I have a solution with differents projects in it, One those is an MVC 3 project, and the other is a test project.</p>
  
  <p>From the test project, I'm trying to test my controllers behavior. But when I'm running a test the system throws an error telling me this:</p>
  
  <blockquote>
    <p>System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.<br>
    WRN: Assembly binding logging is turned OFF.To enable assembly bind failure logging, set the registry value <code>[HKLM\Software\Microsoft\Fusion!EnableLog]</code> (DWORD) to 1.</p>
  </blockquote>
  
  <p>The code from the test os the following:</p>
  
  <pre><code>[TestMethod]
  public void TestMethod()
  {
      var myService = new Mock&lt;IMyService&gt;();
      myService.Setup(a =&gt; a.ReadAuthorizationRequest())
          .Returns&lt;EndUserAuthorizationRequest&gt;(null);
      int error = 0;
      var controller = new myController(myService.Object);
  
      try
      {
          var actionResult = controller.Authorize();
      }
      catch (HttpException exception)
      {
          error = exception.GetHttpCode();
      }
      Assert.AreEqual(403, error);
  }
  </code></pre>
  
  <p>the controller:</p>
  
  <pre><code>public class myController: Controller
  {
      private readonly IMyService _service;
  
      public OAuthController(IMyService service)
      {
          _service = service;
      }
  
      [Authorize, AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)]
      public ActionResult Authorize()
      {
          ClientApplication requestingClient;
          var request = _service.ReadAuthorizationRequest();
          if (request == null)
          {
              throw new HttpException((int) HttpStatusCode.BadRequest,
                  "Missing authorization request.");
          }
       }
  }
  </code></pre>
  
  <p>As you can see, I'm trying to test the controller behavior, so that, whenever the service doesn't read the request the controller should throw an httpException with httpStatusCode 403.</p>
  
  <p>What is wrong with this. Thank you in advance.  </p>