Jump to content

  • Log In with Google      Sign In   
  • Create Account

Visual Studio project settings - location of created files


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Draycos   Members   -  Reputation: 108

Like
0Likes
Like

Posted 17 March 2013 - 12:57 PM

I have customised my Visual Studio (2010 express) project settings to separate project, source, temp, debug build, release build files, etc. in to appropriate sub-folders.  The application I have created, when run in either debug or release mode, creates a config file (CreateFile()), but rather than creating that file in the debug or release directory it is created along side the project (.sln, .vxproj) files.  It doesn't cause any problems other than separation of files that I'd like to ultimately ship together.  When running the executables independently the files are created in the correct folder, alongside the exe.  Can anyone advise me which project settings I need to adjust in order to get round this issue? Thanks.



Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9670

Like
2Likes
Like

Posted 17 March 2013 - 01:12 PM

Goto Debugging/Working Directory to change the working directory of the executable. Keep in mind, however, that there are ways to launch your an application in normal use that won't set the working directory to the executable directory when deployed, so if you depend on a file being created in the same directory as the executable, you should manually find the directory. Of course, the other part of the problem is that on recent versions of Windows the Program Files directories are locked for writing new files, so you should create application specific data in the ProgramData directory and per user information in the appropriate user AppData directory.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS