Were you seeing that error message during the publication or when you tried to visit the revised page after publication?
For the first case, I have no idea :)
For the second case, I have seen cases where an old copy of the project was still being served by IIS. This is a IIS safety mechnasim to avoid breaking a user's active browser session by mixing the old and new code. Once all prior sessions are completed, that instance of the app pool worker will stop running.
IIS is supposed to immediately serve the new version of the project to any new incoming users, but if IIS thinks you were a pre-existing connection, then it will give you the old page.
The easiest thing to try is to close all browser windows and try again.
If the problem is a backend system (like another project), that may not be enough. Stopping and starting the related application pool in IIS manager should be sufficient to force IIS to serve only the newer version of your published project.