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 THIS ONE!
Normally, when this happen locally, i clean all the aspnet temp folder. But recently it was happing when i published my website in Azure. So "clean temp aspnet folder" was not a solution.
After searching on the internet, i founded this:
Clear Temp ASP.NET files from Azure Web Site
It works for me!