the filename, directory name or volume label syntax is incorrect.

I have been trying to start a new project in Visual C# Studio 2005 Express and keep getting the error: 

the filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B)

I have checked my volume label (WINXP) and the directory (E:\VS2005\) and even the filename that i have entered (MyProject) and can find no invalid characters or syntax in any of these.  Yet each time I try to create a new project, I get this error.  I have even changed the directory in the Options (from the default, much longer directory to the one above and several other alternatives) and no effect.  I downloaded the Card Game template from Coding4Fun and was able to open it, but creating new projects is currently impossible.

Any help or hints or whatnot would be great!

Thanks


Answer this question

the filename, directory name or volume label syntax is incorrect.

  • Ostenda

    I read your work around and I'm still getting the error that relates to "&" in project location path. Did you also have to change the user project templates path or items template path (they also have "&" in them for my system install path) I don't know if this is a service pack issue / IDE issue or whether there is a patch MS have available

    Thanks

  • fdirosa

    All i did was go to Tools/Options/Projects and Solutions and changed the path for all 3. I copied the folder Visual Studio 2005 under My Documents into C:\Visual Studio 2005 and it worked fine.
  • Hugh Wood

    I seem to have a different issue. I get the same error message. The path to my projects is on H:\Visual Studio 2005\Projects. However my profile name on the computer has an & in it.....ie 'bob & jane'. I have My documents mapped to H:\, so perhaps it does not like it because of the profile name i cannot change this either...! Any ideas it is really bugging me. it was working 6 weeks ago when i had the beta 2 version of C# express installed, but then it started not working properly, so downloaded the new version hoping it would fix the issue!


  • Lucho1970

    Here is what I did ...

    (1)
    Modified, as appropriate, in Tools -> Options -> Projects and Solutions -> ...

    Project Locations
    Project Templates
    Item Templates

    I removed the %USERPROFILE% (or whatever environment variables might contain the dreaded '&' character ). I actually want the locations in "C:\VisualStudio".

    (2)
    Used regedit to mod the info under

    HKCU\Software\Microsoft\VCSExpress\8.0.

    There were a number of keys that needed to be modified. I modified any env variable that might contain the '&'.

    (3)
    Modified, as appropriate, in Tools -> Options -> Projects and Solutions -> ...

    Clicked ON 'Show advanced build configurations'.

    I did this so that I could the directory I ws actually saving stuff to.

    Hope this helps.

    Bob


  • Sehar Iqbal

    I found the reason for it and a workaround...  it appears that you cannot create a project within a path that has an ampersand (&) in it, which my original projects path did.  In Tools/Options/Projects and Solutions/General, I selected the "Show advanced build configurations' option.  This allows me to select the project build location on creation of a project, and I am now able to ensure it does not try to create in the path with the ampersand in it.

    Cheers

  • McWhirter

    Hmm.... sounds like a bug. I think you should report it...

  • Omar.Rojas

    I receive the error message "the filename, directory name or volume label syntax is incorrect." while trying to open any file with extension .ini , Only when the extension is changed to .txt, i'm able to open the file.

    Is there any workaround for this issue


  • the filename, directory name or volume label syntax is incorrect.