Visual Studio 2010 C++ | Folder structures

Started by
1 comment, last by tapped 10 years, 11 months ago

Hi,

I've set up an repository on BitBucket using GIT.

My problem is VSC++ 2010. It's making it's own folder structure I dislike totally.

I have my own intentions how it should be like.

Is there a way to change it? To have an own structure?

Thank you Techie

P.S.: I'm using Express Edition and NO I can't switch to VSC++ 12, I've Win Vista, though.

It's not a shame to make mistakes. As a programmer I am doing mistakes on a daily basis. - JonathanKlein

Advertisement

Assuming you're talking about source folder structure, you can pretty much do anything you want. Create a project, delete whatever folders you don't like, and add your own. When you've got it how you like it, export the project as a template. Then you can use that structure in any new projects you create by selecting that template.

I will show you how i do it.

  • First create a project, where "Create directory for solution" is ticked.
  • Then remove the project from the solution, by right clicking in the Solution Explorer on the project.(It will not delete the project, only lose reference to it)
  • Now create a new directory for the project file, and call it what you want.
  • Copy the project files from the directory storing the project into your new folder.
  • Back in Visual Studio, add the existing project to the solution file, by File->Add->Existing Project.
  • Now you probably want to define the binary output folder.
  • This is done in the project properties. General tab->Output Directory. Remember to set both Debug and Release.
  • Also, set the path for your source folder, when you create new source files. This is done with the Location property in the add file window.
  • Git got a handy setting file called .gitignore. Use this file to ignore binaries, objects, and other temporary data generated by visual studio.
  • I often use the following ignore file, with some customization for Visual Studio: https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

That's it, customize as much as you want :)

This topic is closed to new replies.

Advertisement