I have a VS 2005 web site that I publish using \"Publish Web Site\", and I clear all the three checkboxes. I also have a deployment project that picks up the published files
It turned out to be a missing (non-web) DLL in the MSI, which I assume was used by the pages giving the error. A quite misleading error message I'd say, as the page was certainly precompiled, but had a missing reference to that DLL.
i was facing this problem when i deployed some changes to my existing site.
To recover from the issue i deleted all files from bin folder and redeployed them.
The issue then resolved.
I hope this may be help some one.
In my case I was not uploading the common DLLs like AjaxControlToolkit.dll, Telerik.dll etc. I uploaded the whole published folder and it fixed it for me.
This option solved the problem for me. Basically, it removes every orphan file left after previous deploy.
I've not had that error, but after a little Googling I came across this link, I'm not sure if you've seen it yet: http://forums.asp.net/t/956297.aspx
Edit (adding the key text):
This error will come when a reference is specified in web.config and deployment folder/site does not contain these dlls installed in the system or bin folder does not contain them(if they are private assemblies). For Example: (add assembly="Namespace1.NameSpace2, Version=x.x.x.x, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/) if your web.config contains any assemblies like this and deployed server doesnot contain these assembiles in bin or GAC, then this error will occur.
People were reporting that missing assemblies on the destination server ended up being the root cause, in their cases, but they had the same error as you. Weird.
Maybe that's the problem?
We fixed this by restarting the AppPool, after trying several of the other solutions. Republishing was not an option on this occasion.