Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use Visual Studio C++ to debug an existing project, but without generating additional files within the project itself.

How can I tell visual C++ 2008 to put its own stuff in a separate directory outside the project?

share|improve this question
up vote 3 down vote accepted

Short answer: You can't.

When you attach the debugger to an executable, VS2008 will insist on generating a "solution" file, even if you click on the "No" button of the Save solution button. This can be most annoying, having to delete these files stored in the executable's directory.

However, if you debug the same executable more than once, this can actually be pretty useful for saving debug settings, such a breakpoints, across debug sessions.

share|improve this answer

See if can you set the whole project up in the "separate directory outside the project", and save the useful files somewhere else.
Add Existing Item [Shift+Alt+A] springs to mind, along with changing output directory:

  1. Right-click project in Solution Explorer
  2. Properties
  3. Configuration Properties
  4. Output Directory.

I'm on version 2010 Express, so check before following my advice.

share|improve this answer

a couple of options:

  • make a copy of the project and then do your thing at the copy
  • get mercurial / git, put the original files under version control and then do your thing
  • build a new buildsystem (cmake comes to mind) which allows you to separate source files from created files
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.