Search

Renaming of control fails with error on designer surface by PeteL - MSFT

Closed
as Fixed Help for as Fixed

14
Sign in to vote
0
Sign in to vote
Sign in
to vote
Type: Bug
ID: 101992
Opened: 1/31/2006 9:52:24 AM
Access Restriction: Public
1
Workaround(s)
8
User(s) can reproduce this bug
When attempting to rename a control on the designer surface, a warning is given to the user and then the rename fails silently.
Details (expand)
Product Language
English
Version
Visual Studio 2005
Category
Other
Operating System
Windows XP Professional
Operating System Language
US English
Steps to Reproduce
Create a new "WebSite"
Select "Default.aspx"
Switch to "Design View"
Drag and Drop a "Login" control to design view.
Double click on the "Login control"
Add the following to the "Authenticate" event handler

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e) {
if (FormsAuthentication.Authenticate(Login1.UserName, Login1.Password )) {

}
}

Build the solution - Ctrl + Shift + B

Shutdown VS 2005
Go to C:\Documents and Settings\[UserName]\Local Settings\Application Data\Microsoft\WebsiteCache

Delete the folder for the website you just created (in my case Website7)

Open VS 2005
Open the website project you were working on

Go to the design view of default.aspx
Select the Login control
Attempt to rename the ID to Login1x (in the properties panel)

You get the following:
---------------------------
Microsoft Visual Studio
---------------------------
If you have references in markup, they will not be renamed.
Do you want to continue?
---------------------------
Yes No
---------------------------
Actual Results
Control does not rename
Expected Results
Control to rename
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 2/15/2006 at 2:30 PM
Thank you for your bug report.

This problem should only occur if you have multiple instances of the Visual Studio IDE open at the same time and then close one. You can avoid this problem by only having one instance open at a time.

A fix has been created for this bug. The fix will be in the next version of Visual Studio or possibly in a service pack. If this bug is significantly impacting your development you should contact Microsoft Product Support to request a hot fix.

Microsoft Web Development Tools Team
Posted by Microsoft on 2/20/2006 at 3:50 PM
Clarification for user comments:

The underlying problem is that if the WebSiteCache directory for a specific web site is deleted this problem will occur. Once the directory is deleted it will continue to occur even if you reboot the machine.

There is a bug in Visual studio that when you have more than one instance of the IDE open and close a web-site it will delete the WebSiteCache directory of other web-sites. This is the common way to get into this situation. However, you could also get into the situation by deleting the directory manually (per the repro steps of this bug report.)

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\"
Posted by Microsoft on 1/17/2007 at 2:06 AM
Thank you for submitting this issue. The bug has been resolved Fixed, and its resolution shipped as part of Visual Studio 2005 Service Pack 1 (SP1).

You can download SP1 at http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx. If installing SP1 does not resolve the issue for you, please reactivate.

Thanks again for your feedback!
-Scott Currie
-DDTFA Program Manager