In a MVC2 project I moved a file from App_code to Content folder and compiled it. Then move it back again to App_Code and then changed its Build Action to \"Compile\". Now I
Try cleaning your solution and then try to rebuild. Visual Studio probably still has reference to the old dll after it created the new dll.