Blog Stats
  • Posts - 5
  • Articles - 0
  • Comments - 6
  • Trackbacks - 3

 

Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

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.


Feedback

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar Thnx, this was very helpfull.
I like the tip about the switching between markup and design very much too. 7/25/2006 7:36 AM | Sjonnie2nd

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar This solved my error.

thanks 10/25/2006 2:08 PM | Sarbjit

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar
The tip: make VS re-build the web site cache worked for me. What a pain... glad I was able to find the solution here.

Thanks!!! 2/14/2007 10:49 AM | bwtraz

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar Hi,
thanks,
its really helpful
and saved almost 5 valuable hrs. 6/14/2007 2:38 PM | Rohit Todwal

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar With your help, I solved my problem.
Thank you very much 7/31/2007 3:35 AM | Xinguo Wang

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar Thank you so much for your help man!

Cheers!

Aftab
http://ComputerVideos.110mb.com/ 12/20/2007 7:26 AM | Computer Videos

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar Thanks for help. I agree, it is very annoying. 3/8/2008 8:06 PM | Nick

# re: Visual Studio web Form Designer message "If you have references in markup, they will not be renamed"

Gravatar Thank you very much! I created a batch file for this in case this annoying glitch appears again! 8/14/2008 10:40 AM | Steven Z

Post a comment





 

Please add 2 and 1 and type the answer here:

 

 

Copyright © Ignus Bezuidenhout