Click here to Skip to main content
Licence 
First Posted 27 May 2006
Views 68,473
Bookmarked 14 times

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

By | 27 May 2006 | Article
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

About the Author

Alex B. Clarke

Web Developer

United Kingdom United Kingdom

Member

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.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralI was such kind of problem.. [modified] Pinmembergggmarketing3:16 10 Sep '11  
General5 from me PinmemberMANSATAN22:45 27 Jul '09  
GeneralFantastic !!! PinmemberMember 448943821:05 18 May '09  
GeneralBest solution PinmemberNguyennamhs18:33 18 May '09  
GeneralThts a great find Pinmemberangsram5:51 3 Mar '08  
GeneralThank you PinmemberMukesh_B23:40 5 Jul '07  
GeneralThis is the complete fix Pinmemberjlavigne8:47 17 May '07  
GeneralRe: This is the complete fix PinmemberAlex B. Clarke9:34 18 May '07  
GeneralAnother soultion. Pinmemberhibias5:06 15 Aug '06  
GeneralRe: Another soultion. Pinmembercider1235:31 28 Sep '06  
GeneralRe: Another soultion. PinmemberAlex B. Clarke9:15 28 Sep '06  
GeneralThe Easiest Solution Pinmemberrjainx5:32 29 Sep '06  
GeneralSolved in 2 seconds last night. PinmemberScurvee11:15 3 Oct '06  
GeneralRe: Solved in 2 seconds last night. PinmemberScurvee6:08 13 Nov '06  
GeneralRe: Solved in 2 seconds last night. Pinmemberjdkulkarni21:36 13 Nov '06  
General.A Big Help - Thank you. PinmemberEdTheBurger22:09 28 Jun '06  
GeneralPossible Pattern PinmemberRobEmDee17:27 11 Jun '06  
GeneralIt happens to me all the time PinmemberAnatoly Rapoport21:05 28 May '06  
GeneralRe: It happens to me all the time PinmemberAlex B. Clarke22:33 28 May '06  
GeneralRe: It happens to me all the time Pinmemberdapoussin0:04 30 May '06  
It's a pain indeed. The workaround I used to solve this problem is too go in markup mode and rename my control in the XML. It has always worked fine, but it's better to rename it in design mode.
 
I've noticed that the folder you mention contains XML files :
- FileAttributes.xml, which references all files in App_code folder
- PublishState.xml, which contains information about publish target site and publish parameters. This file is only created if my web project has been published at least once.
 
The bug this article is about seems to be related with another bug I'm experiencing : my publish parameters are discarded each time I close VS.NET 2005. This is also really annoying.
 
Anyway, your workaround doesn't seem to work, even if I recompiled my project or close and reopen VS.NET 2005. The XML files don't seem to be generated automatically Cry | :((
 
Hope this helps.
Laurent
AnswerRe: It happens to me all the time [modified] PinmemberAlex B. Clarke1:53 30 May '06  
GeneralRe: It happens to me all the time PinmemberAlex B. Clarke1:04 31 May '06  
GeneralRe: It happens to me all the time PinmemberAnatoly Rapoport1:38 31 May '06  
Questionhow to recreate error? Pinmembercodebased22:43 27 May '06  
AnswerRe: how to recreate error? PinmemberAlex B. Clarke1:54 28 May '06  

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

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

Permalink | Advertise | Privacy | Mobile
Web04 | 2.5.120529.1 | Last Updated 28 May 2006
Article Copyright 2006 by Alex B. Clarke
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid