Click here to Skip to main content
15,040,003 members
Articles / Web Development / ASP.NET
Posted 27 May 2006


14 bookmarked

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
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


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.


1. Navigate to the directory

..\Documents and Settings\<%UserName%>\Local Settings\Application

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


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


About the Author

Alex B. Clarke
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
Membergggmarketing10-Sep-11 3:16 
General5 from me Pin
MANSATAN27-Jul-09 22:45
MemberMANSATAN27-Jul-09 22:45 
GeneralFantastic !!! Pin
Member 448943818-May-09 21:05
MemberMember 448943818-May-09 21:05 
GeneralBest solution Pin
Nguyennamhsm18-May-09 18:33
MemberNguyennamhsm18-May-09 18:33 
GeneralThts a great find Pin
angsram3-Mar-08 5:51
Memberangsram3-Mar-08 5:51 
GeneralThank you Pin
Mukesh_B5-Jul-07 23:40
MemberMukesh_B5-Jul-07 23:40 
GeneralThis is the complete fix Pin
jlavigne17-May-07 8:47
Memberjlavigne17-May-07 8:47 
GeneralRe: This is the complete fix Pin
Alex B. Clarke18-May-07 9:34
MemberAlex B. Clarke18-May-07 9:34 
GeneralAnother soultion. Pin
hibias15-Aug-06 5:06
Memberhibias15-Aug-06 5:06 
GeneralRe: Another soultion. Pin
cider12328-Sep-06 5:31
Membercider12328-Sep-06 5:31 
GeneralRe: Another soultion. Pin
Alex B. Clarke28-Sep-06 9:15
MemberAlex B. Clarke28-Sep-06 9:15 
GeneralThe Easiest Solution Pin
rjainx29-Sep-06 5:32
Memberrjainx29-Sep-06 5:32 
GeneralSolved in 2 seconds last night. Pin
Scurvee3-Oct-06 11:15
MemberScurvee3-Oct-06 11:15 
GeneralRe: Solved in 2 seconds last night. Pin
Scurvee13-Nov-06 6:08
MemberScurvee13-Nov-06 6:08 
GeneralRe: Solved in 2 seconds last night. Pin
jdkulkarni13-Nov-06 21:36
Memberjdkulkarni13-Nov-06 21:36 
General.A Big Help - Thank you. Pin
EdTheBurger28-Jun-06 22:09
MemberEdTheBurger28-Jun-06 22:09 
GeneralPossible Pattern Pin
RobEmDee11-Jun-06 17:27
MemberRobEmDee11-Jun-06 17:27 
GeneralIt happens to me all the time Pin
Anatoly Rapoport28-May-06 21:05
MemberAnatoly Rapoport28-May-06 21:05 
GeneralRe: It happens to me all the time Pin
Alex B. Clarke28-May-06 22:33
MemberAlex B. Clarke28-May-06 22:33 
GeneralRe: It happens to me all the time Pin
dapoussin30-May-06 0:04
Memberdapoussin30-May-06 0:04 
AnswerRe: It happens to me all the time [modified] Pin
Alex B. Clarke30-May-06 1:53
MemberAlex B. Clarke30-May-06 1:53 
GeneralRe: It happens to me all the time Pin
Alex B. Clarke31-May-06 1:04
MemberAlex B. Clarke31-May-06 1:04 
GeneralRe: It happens to me all the time Pin
Anatoly Rapoport31-May-06 1:38
MemberAnatoly Rapoport31-May-06 1:38 
Questionhow to recreate error? Pin
codebased27-May-06 22:43
Membercodebased27-May-06 22:43 
AnswerRe: how to recreate error? Pin
Alex B. Clarke28-May-06 1:54
MemberAlex 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.