 |
|
 |
I was facing such problem. Than I contact a friend who is the first boy of CSE of our batch. Than He solved the problem. I think I am lucky that I have such friend. You can contact any person who is good in Visual Studio.
|
|
|
|
 |
|
 |
works and to the point. excellent
|
|
|
|
 |
|
 |
Thank you soo much. Its working.
|
|
|
|
 |
|
 |
Follow me! this is easier .
you need only change the path to your project with a shorter name
Ex: D:/VS5/
|
|
|
|
 |
|
 |
Thats a great find for a stupid error. Thanks. Whenever I encounter this error, I switch to html source mode and change it.
Thanks
sairam
|
|
|
|
 |
|
 |
this tip help me to save time.
Thanks
Mukesh
|
|
|
|
 |
|
 |
This works every time, see this thread for more info
1) Close all instances of Visual Studio
2) Delete folders and files in the following directory "Documents and Settings\<%YourUserID%>\Local Settings\Application Data\Microsoft\WebsiteCache\<%YourProjectName%>"
3) Remove the line related to your project from "...\WebsiteCache\WebSites.xml"
4) add the following folder "...\WebsiteCache\<%YourProjectName%>\Refactor"
5) Open the project from within Visual Studio, rather than clicking on solution file.
Enjoy.
Have a good one.
Jay
http://www.bwlogic.com
|
|
|
|
 |
|
 |
Excellent site (http://www.bwlogic.com), mate, contents and UI!
You are right, I did an add-on a follow up to my original "discovery"
http://xealcom.net/CodeSamples/VS_PublishStateError.aspx
Best of luck with LWBlack getting big!
Alex.
Alex B. Clarke
It's easy when you know it.
|
|
|
|
 |
|
 |
I ran into the same issue and there was no project directory in the ..\docs&settings\...\WebSiteCache
I fixed mine by simply closing the solution which created the proper directory, and then re-opening the project.
J.
|
|
|
|
 |
|
 |
In the past I was able to fix this simply by closing the project and re-opening it, but this last time it didn't seem to make a difference.
I tried deleting the web cache as suggested below also, that didn't work either.
What I ended up doing was deleting the 2 project files that are created on your local system when you open a web site (on another Server on our LAN) through Visual Studio 2005. When I opened the web site again, they were re-created and everything worked fine.
The project files were under:
My Documents\Visual Studio 2005\Projects\(Web Site)
|
|
|
|
 |
|
 |
After I publiched this article I ran into another little problem with VS2005. When I worked out how to troubleshoot it, I learnt that it also solves "The Directory Name is Invalid" error. If you get the error again, you can try this method:
http://xealcom.net/CodeSamples/VS_PublishStateError.aspx[^]
Alex B. Clarke
It's easy when you know it.
|
|
|
|
 |
|
 |
Delete and Recreate the WebSite at IIS web server. This will fix for sure.
|
|
|
|
 |
|
 |
Switch to source view and change the ID in the markup.
|
|
|
|
 |
|
 |
You're a fricken genious!
|
|
|
|
 |
|
 |
Looks like you too..
Jayant D. Kulkarni
Brainbench Certified Software Engineer in C#, ASP.NET, .NET Framework and ADO.NET
|
|
|
|
 |
|
 |
MS should put out a patch for this one. Thanks for the fix.
|
|
|
|
 |
|
 |
I use a templated folder structure for every project I work on. With VS.NET 2005 this means that every 'website' project I am working on is stored in a separate client/project folder directory BUT the project files always reside in a child folder named 'SITE'. Whenever I switch between working on different website projects, I receive the error 'The directory name is invalid' when changing a control's ID in the newly loaded project. I simply need to close and restart VS each time I switch between website projects to avoid running into this error.
|
|
|
|
 |
|
 |
I'm also ask on asp.net forums the question, but never get an answer.
I'l try your solution.
|
|
|
|
 |
|
 |
It's a pain, isn't it , but thanks for letting me know .
Please let me know if the solution I offered in the article helped you. If not, can you describe the simptoms.
Alex B. Clarke
|
|
|
|
 |
|
 |
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
Hope this helps.
Laurent
|
|
|
|
 |
|
 |
Thanks for your question, Laurent.
Re: Errors when publishing.
I noticed that this approch also solves errors when re-naming a control ID in design mode.
Here's a workaround that works for me,
and by the way it's also solves problems related to re-naming controls in design mode.
Please let me know if it did the "trick" for you
1. Close all instances of VS
2. Delete directory where the site you are going to open in the next step keeps its solution file.
3. Delelet all folders and files from \Documents and Settings\...\WebsiteCache
4. Start Visual Studio either from devenv.exe, not by clicking on a project or solution file.
5. In Visual Studio IDE click on File -> Open -> Website and select File System.
6. Navigate to the directory of your web site project and click Open
VS will create a solution folder in the Solution Explorer and a new directory <%YouWebProjectName%> in
\Documents and Settings\...\WebsiteCache
7. Save solution by clicking on File -> Save Solution.
8. Connect to the site where you want to publish your project and login.
9. To test if there is aproblem, pick a file from Source Web site and copy it to the Remote Web site.
VS will create \Documents and Settings\...\WebsiteCache\<%YouWebProjectName%>\CopyWebSite.log
10. Click on Disconnect button to dsconnect.
11. Close CopyWeb tab:
VS should create PublishState.xml and RemoteState1.xml in
\Documents and Settings\...\WebsiteCache\<%YouWebProjectName%>\
12. Close VS.
VS should create a few *.tmp files and a FileAttributes.xml in
\Documents and Settings\...\WebsiteCache\<%YouWebProjectName%>
If you didn't get any errors during the above process, you should be able to publish the entire site
without any errors.
In a nutshell it's a two-step process:
1. Delete folders and files in ...\WebsiteCache directory
2. Open the project from within Visual Studio, rather than clicking on solution file.
-- modified at 6:56 Wednesday 31st May, 2006
|
|
|
|
 |
|
|
 |
|
 |
Thanks Alex.
I'll definitely try it.
Meanwhile I didn't get any 'directory is invalid' messages
|
|
|
|
 |
|
 |
I never seen this error?
"Practice Make Man Perfect"
|
|
|
|
 |
|
 |
Thanks for your question.
I'm not sure how to reproduce the error, but it did happen to me a few times. When I searched for possible a answer I came across this link http://unboxedsolutions.com/sean/archive/2005/11/20/792.aspx The also had the same problem. So, I used FileMon and figured out why the error was popping up.
Alex.
|
|
|
|
 |