Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 581347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:34:08+00:00 2026-05-13T14:34:08+00:00

I have an application that is localized for use across Europe. I have a

  • 0

I have an application that is localized for use across Europe.

I have a menu option that loads a file from disk.

This operation works fine on my dev machine but does not work on the virtual machine I use to test other operating systems _ e.g French, Spanish etc.

A FileNotFoundException is generated when the StreamReader tries to open the file.

It says “‘Could not find the file C:\Program Files\MyCompany\MyTool\bin\Files\debug.txt'”

Thing is, the file does exist, at the correct location and with the correct filename.

The directory names on the target (French) operating system are the same as the dev machine.

Any ideas?

string ourPath =   System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);

           try
        {
            System.IO.StreamReader sr = System.IO.File.OpenText(ourPath + @"\bin\Files\debug.txt");
            string input = null;
            while ((input = sr.ReadLine()) != null)
            {
                m_text.Append(input);
            }
            sr.Close();
        }
        catch (System.IO.FileNotFoundException)
        {
            MessageBox.Show("LoadDebugOptions: File Not Found: " + ex.Message);
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:34:09+00:00Added an answer on May 13, 2026 at 2:34 pm

    Ok found the problem.

    Determined that the operating system was reading the file displayed in explorer as “debug.txt” as “debug.txt.txt”.

    This was determined by using a call to System.IO.Directory.GetFiles to list the files in the target directory.

    If I remove the .txt extension so that windows explorer displays it as “debug” then the file is found.

    Turns out explorer was hiding file extensions of known types on the target machine.

    FYI —————————————————————-

    Open Explorer, Select Tools->Folder Options then the View Tab.

    Scroll down and uncheck “Hide extensions for Known file types”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a localized spring mvc based web application, that has an externalized messages
I have an application that goes like this F5 load balancer - IHS(a&b) -
I have an application that lives in the menubar, without a main menu or
I have an application that is supposed to be localized (two languages, english being
I have a visualization web application (small project) that creates charts and graphs from
I have an ASP .NET Web Forms application that makes use of the 'WebMethod'
I have an application that enabled that user to switch language at run-time from
I have a Cocoa application. This hooks up into OSX Service Menu. I have
I have settings.bundle in my application with a Root.plist that is localized correctly with
I have a WPF application in C# that may need to be localized in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.