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

  • Home
  • SEARCH
  • 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 8630267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:01:25+00:00 2026-06-12T09:01:25+00:00

My exe’s path is c:\dev\source\project1\bin\debug\app.exe but my XML file is located at c:\dev\source\project1\file.xml How

  • 0

My exe’s path is c:\dev\source\project1\bin\debug\app.exe

but my XML file is located at c:\dev\source\project1\file.xml

How can I load the XML file at runtime, right now I have been hard-coding the absolute url, but I don’t want to do it this way.

What happens in the scenario if I change the location or the end-user moves the file to another location, for example, file.xml gets moved to a sub-directory under project1 called sub, would I have to change things again. Is there way to not have to worry about were the file is located?

  • 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-06-12T09:01:25+00:00Added an answer on June 12, 2026 at 9:01 am

    In your Solution Explorer go to the XML file set Copy to Output Directory to Copy Always or Copy if Newer This will put a copy of the xml file in c:\dev\source\project1\bin\debug\ and have your program reference the version that is in the same folder as the exe.

    enter image description here

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

Sidebar

Related Questions

Using the following explorer.exe /select, c:\path\to\file.txt I can open Windows Explorer and select the
It always puts the .exe file into the same directory as the source file.
I try to execute .exe file using nsIProcess. But it is not working and
Possible Duplicate: Running a .exe file using Java How can i run a .exe
my .exe and addrr.txt files are located on D:\ drive when im trying to
I am running ffmpeg.exe through a Java code to encode a video file. How
Im trying to run exe file with c++ with no luck I tried this:
Start server: bin\mongod.exe -dbpath=D:\mongo\dbs -rest -logpath=logs\server.log -logappend -noauth In java: Mongo mongo = new
I put exe file in project, and from button click execute those exe, and
I have an exe file. Lets call it X.exe It is a console application

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.