A day or so ago I started getting the message “If you have references in markup, they will not be renamed” in my ASP 2.0 project whenever I change a control name on my page.
At first I thought it was because I just added a master page to all my pages and that is causing some issues. I decided to live with it for now since most of my development is done and I am just cleaning up stuff. But as expected the users now want a few more “fields“ on the page. Then it really got on my nerves.
I started looking around and found a entry by Rick Strahl (http://west-wind.com/weblog/posts/3192.aspx) that pointed me to the Visual Studio bug list where this has been reported and two workarounds are posted there: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=101992
A quick summary of the workarounds (both worked for me):
The quick fix is to make VS re-build the web site cache:
a) shut down all instances of VS
b) remove cache from command prompt> rd /s /q "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache"
c) re-open your web site and the cache will be re-created
An alternative method to fix the one web site without deleteing the entire cache is the following:
a) shut down all instances of VS
b) open "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache\websites.xml"
c) locate the entry for your web site and get its CacheFolder name. Usually the name of the web.
d) Ensure a sub-directory of that name exists under "%userprofile%\Local Settings\Application Data\Microsoft\WebsiteCache\"
Enjoy.
PS: I also found the shortcut key for switching between markup and design view. It is CTRL-Page Up or CTRL-Page Down.