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 856745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:17:07+00:00 2026-05-15T08:17:07+00:00

I have a C++ solution in VS2008 with multiple projects. This solution contains files

  • 0

I have a C++ solution in VS2008 with multiple projects. This solution contains files that are needed at runtime, which are loaded according to a path relative to the solution directory (e.g. "Testing/data/" + "dataN.bin").

In order for this solution to work, I must set the working directory setting in the project(s) so that it will point to the solution directory (e.g. Configuration Properties >> Debugging >> Working Directory = $(SolutionDir) ). This works fine when i’m debugging on my own PC. However, when a different user loads my solution, his projects does not have this property set properly.

I have traced this setting to be stored not in the project file (PROJECT.vcproj), but in the user-specific file created for it (PROJECT.vcproj.DOMAIN.USER.user).

I would like a way for this setting to be stored for ALL users, without having to set it manually again and again.

My thoughts were:

  • Find a way to store this in the .vcproj file (not the user-specific one) or the solution file.
  • Find a way to create a “default-user-specific file“, from which all user-specific settings will start out (and can modify at will later).

However, I did not find a way to do either of these.

A few more notes / constraints:

  • I need to work with many big files as these resources, therefore I would like to avoid performing copies to different directories.
  • The solutions needs to support multiple build configurations (debug, release, etc.).
  • I would like to avoid pre/post build scripts if possible, to keep things straightforward (low priority).

Any help will be appreciated… thanks in advance.

  • 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-15T08:17:08+00:00Added an answer on May 15, 2026 at 8:17 am

    No such property exists. There are bigger issues, this also needs to work after you deploy your solution. The working directory then is not going to be a “solution” directory, there isn’t one on the target machine.

    You are much better off working from the assumption that the working directory is the same as the EXE directory. That will be the default both while debugging and on the target machine. You have full control over the location of the EXE file with a linker setting. And you can protect yourself from a shortcut running your program with another working directory by obtaining the EXE directory in your code so you can generate an absolute path. Use GetModuleFileName(), pass NULL to get the path to the EXE file.

    Another standard solution is to copy any kind of resources the EXE needs to a folder that’s relative from the build output folder. You do this with a Pre-Build event, make the command line look similar to this:

    if not exist "$(OutDir)\Testing" md "$(OutDir)\Testing"
    xcopy /d /s "$(SolutionDir)\Testing\*.*" "$(OutDir)\Testing
    

    Note how the /d option ensures that copying is only done if the Testing folder content changed.

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

Sidebar

Ask A Question

Stats

  • Questions 460k
  • Answers 460k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Have you tried SWFTOOLS? On Debian/Unbuntu: sudo apt-get install swftools… May 15, 2026 at 11:43 pm
  • Editorial Team
    Editorial Team added an answer Adding the following to your fabfile.py should work: env.user =… May 15, 2026 at 11:43 pm
  • Editorial Team
    Editorial Team added an answer You will need some margin-left: {xyz}px; padding-left: {xyz}px; (adjust to… May 15, 2026 at 11:43 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.