locked
FileNotFoundException even though file is present. RRS feed

  • Question

  • I have three text files in my project. Each is set to "Content" and "Copy if newer". My application can open and read the first two of them but the third one gives me a "FileNotFoundException" when I try to open it using "FileOpen". It's looking in the "bin\debug" folder, and I know it's there, and the file name is spelled correctly. I've had earlier versions of this application working correctly. The only thing I've changed is the files I'm reading.
    • Edited by bsaucer1 Tuesday, July 10, 2012 6:36 PM spelling
    • Moved by Mark Liu-lxf Wednesday, July 11, 2012 6:23 AM Not a IDE issue (From:Visual Basic IDE)
    Tuesday, July 10, 2012 6:35 PM

Answers

  • I found my error! I had a double period in the file name. The periods are so tiny on my screen I couldn't see I had two of them!
    • Proposed as answer by Armin Zingler Wednesday, July 11, 2012 8:53 PM
    • Marked as answer by Mark Liu-lxf Thursday, July 12, 2012 1:56 AM
    Wednesday, July 11, 2012 8:23 PM

All replies

  • Hi bsaucer1,

    Welcome to the MSDN forum.

    The VS works well in my side, and I can’t re-appearance your issue. Would you like to share more information about what have done with the third text file? You also can try to create a new project to check whether it will occur.

    If you have steps to reappearance the issue, please share it here. It will be very helpful to solve your issue.

    I look forward your reply.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, July 11, 2012 7:05 AM
  • I found my error! I had a double period in the file name. The periods are so tiny on my screen I couldn't see I had two of them!
    • Proposed as answer by Armin Zingler Wednesday, July 11, 2012 8:53 PM
    • Marked as answer by Mark Liu-lxf Thursday, July 12, 2012 1:56 AM
    Wednesday, July 11, 2012 8:23 PM