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






4.73/5 (23 votes)
May 28, 2006

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