Click here to Skip to main content
15,881,172 members
Articles / Web Development / ASP.NET
Article

Visual Studio 2005: "The Directory Name is Invalid" Error

Rate me:
Please Sign up or sign in to vote.
4.73/5 (26 votes)
27 May 2006 109.1K   14   26
When renaming a control ID in VS2005 Web Project at design, IDE may trough an error.

Visual Studio 2005: "The Directory Name is Invalid" Error

Visual Studio 2005: "Failed to find definition" Error

Description

When working with a Web Site project in Visual Studio 2005 you may get an error when re-naming control ID in design mode. Error message can be one of the following:

  • Failed to find definition.
  • The directory name is invalid.

Sample Image - VSPropRenameBug.gif

The error may not happen if you don't have App_Code directory defined within your project.

Workaround

1. Navigate to the directory

..\Documents and Settings\<%UserName%>\Local Settings\Application
      Data\Microsoft\WebsiteCache

2. Create a folder with the same name as the name of your project.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United Kingdom United Kingdom
Alex B. Clarke is a professioinal software developer specialising in .Net, C#, Asp.Net, SQL, ADSI, CDO, and other technolgies. He writes applications that automate business processes.

Comments and Discussions

 
GeneralI was such kind of problem.. [modified] Pin
gggmarketing10-Sep-11 3:16
gggmarketing10-Sep-11 3:16 
General5 from me Pin
MANSATAN27-Jul-09 22:45
MANSATAN27-Jul-09 22:45 
GeneralFantastic !!! Pin
Member 448943818-May-09 21:05
Member 448943818-May-09 21:05 
GeneralBest solution Pin
Nguyennamhsm18-May-09 18:33
Nguyennamhsm18-May-09 18:33 
GeneralThts a great find Pin
angsram3-Mar-08 5:51
angsram3-Mar-08 5:51 
GeneralThank you Pin
Mukesh_B5-Jul-07 23:40
Mukesh_B5-Jul-07 23:40 
GeneralThis is the complete fix Pin
jlavigne17-May-07 8:47
jlavigne17-May-07 8:47 
GeneralRe: This is the complete fix Pin
Alex B. Clarke18-May-07 9:34
Alex B. Clarke18-May-07 9:34 
GeneralAnother soultion. Pin
hibias15-Aug-06 5:06
hibias15-Aug-06 5:06 
GeneralRe: Another soultion. Pin
cider12328-Sep-06 5:31
cider12328-Sep-06 5:31 
GeneralRe: Another soultion. Pin
Alex B. Clarke28-Sep-06 9:15
Alex B. Clarke28-Sep-06 9:15 
GeneralThe Easiest Solution Pin
rjainx29-Sep-06 5:32
rjainx29-Sep-06 5:32 
GeneralSolved in 2 seconds last night. Pin
Scurvee3-Oct-06 11:15
Scurvee3-Oct-06 11:15 
GeneralRe: Solved in 2 seconds last night. Pin
Scurvee13-Nov-06 6:08
Scurvee13-Nov-06 6:08 
GeneralRe: Solved in 2 seconds last night. Pin
jdkulkarni13-Nov-06 21:36
jdkulkarni13-Nov-06 21:36 
General.A Big Help - Thank you. Pin
EdTheBurger28-Jun-06 22:09
EdTheBurger28-Jun-06 22:09 
GeneralPossible Pattern Pin
RobEmDee11-Jun-06 17:27
RobEmDee11-Jun-06 17:27 
GeneralIt happens to me all the time Pin
Anatoly Rapoport28-May-06 21:05
Anatoly Rapoport28-May-06 21:05 
GeneralRe: It happens to me all the time Pin
Alex B. Clarke28-May-06 22:33
Alex B. Clarke28-May-06 22:33 
It's a pain, isn't it Frown | :( , but thanks for letting me know Smile | :) .

Please let me know if the solution I offered in the article helped you. If not, can you describe the simptoms.

Alex B. Clarke
GeneralRe: It happens to me all the time Pin
dapoussin30-May-06 0:04
dapoussin30-May-06 0:04 
AnswerRe: It happens to me all the time [modified] Pin
Alex B. Clarke30-May-06 1:53
Alex B. Clarke30-May-06 1:53 
GeneralRe: It happens to me all the time Pin
Alex B. Clarke31-May-06 1:04
Alex B. Clarke31-May-06 1:04 
GeneralRe: It happens to me all the time Pin
Anatoly Rapoport31-May-06 1:38
Anatoly Rapoport31-May-06 1:38 
Questionhow to recreate error? Pin
codebased27-May-06 22:43
codebased27-May-06 22:43 
AnswerRe: how to recreate error? Pin
Alex B. Clarke28-May-06 1:54
Alex B. Clarke28-May-06 1:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.