While I was playing around with the Mvc framework, I received this error message:
The type ‘System.Web.Mvc.Controller’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘System.Web.Extensions, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35’.
What this simply means, is that I forgot to reference the System.Web.Extensions within my code, in this case it was by test harness/project.
However, when I looked in the .Net reference table, I couldn’t see the 184.108.40.206 assembly listed. I went into the GAC (C:WindowsAssembly) and there it was listed but it wouldn’t let me reference the assembly. Finally, I went to C:Program FilesReference AssembliesMicrosoftFrameworkASP.NET 3.5 Extensions and added the reference from there.
Remember, if your creating your own test project with NUnit or MbUnit then you will need to reference System.Web.Extensions within that project as well.