0

I work with a solution that has a lot of projects in it. I created a new build configuration to speed up working with it.

To speed up compiling, I set most of the projects not to build in my new build configuration. To speed up debugging, I set most of the projects to build for release in my new build configuration.

This is great, until I have to check in a change to the project file, or get the latest from someone else's changes to the project file. It is painful to merge the changes, or shelve and unshelve them constantly.

Is it possible to store my build configuration in a separate file? Ideas for workarounds welcome.

Hoppe
  • 5,820
  • 13
  • 51
  • 102
  • I'm surprised you can mix debug and release builds for debugging, are you only using plain C static libraries or so? Or C#? – stijn Sep 11 '14 at 07:19
  • I set only the projects that I want to debug to debug, and the rest to release - C# / VB.NET – Hoppe Sep 11 '14 at 12:44

1 Answers1

2

To answer the question directly: no you cannot store your config in a seperate file. Unless that seperate files is also a solution file of course. But there are some workarounds, all stored locally on your machine (too long for a comment so I'm posting an answer anyway):

I set most of the projects not to build in my new build configuration

  • just build them once, then unload the projects so they will not be built again. These settings are stored in the .suo file.
  • if you insist on keeping a seperate build configuration: ask the team if it's ok to push it into the source control, maybe others can benefit from it as well?
  • or write a script to transfrom the original solution file into one having our build config. That can be as simple as applying a patch, which you should keep up-to-date

To speed up debugging, I set most of the projects to build for release

  • write a script to delete the pdb files of those projects
  • for C++: add all namespaces of those projects to the natstepfilter file
stijn
  • 31,563
  • 13
  • 95
  • 145
  • Sounds like I'll be writing an app to loop through the solution file. Thanks! – Hoppe Sep 12 '14 at 17:23
  • 1
    Shouldn't be a full-blown app: the simplest is creating a patch from you modifications, store it and whenever the upstream changes, revert the solution and apply your patch again. Git for example has all this stuff built-in so it's only a couple of lines in a batch file – stijn Sep 12 '14 at 17:50
  • Good point. I'm using TFS. I'll put the shelve / unshelve commands in a batch file. As the solution changes, hopefully the merging doesn't become too much of a hassle. If it does, maybe then i'll write an app – Hoppe Sep 13 '14 at 16:30
  • 1
    Create your own separate solution file and set it up as you want. It's easier to add fresh changes you need from main into your solution than merge, especially when you are getting merge conflicts. – Alexey Shcherbak Sep 14 '14 at 12:15