7

I asked a question earlier today (Methods of Managing Source Code) as I've been unhappy with the way I manage my shared libraries' source code. As a result of the answers posted, I have found a better method.

I'm now working through my repository tidying up all my source code, however as a result I now have another question...

Whilst I'm still developing a piece of software, is it better to reference the debug build of the library (at this risk of forgetting to replace this with the release build at a later date)?

Or in other words, if I reference the release build of the library, will it restrict debugging if the debug build of my software crashes?

Community
  • 1
  • 1
Bryan
  • 3,224
  • 9
  • 41
  • 58

3 Answers3

5

It depends a lot on how tight your project and library are connected during development but you should in general

  • develop and test the library
  • create a release build
  • use that Release build in other projects
  • when needed, temporarily use a Debug build to find and solve integration problems.

But when the Projects are tightly interwoven, that 'temporarily' can span most of the development cycle.

And there is no cure for 'forgetting' to switch, you should always check and double-check. But that should not drive your decision here.

H H
  • 263,252
  • 30
  • 330
  • 514
  • Okay, so I guess if my library is pretty much static (i.e. it's tried and tested and is used in quite a few projects), then there is no reason why I shouldn't be referencing the release build? – Bryan Feb 28 '10 at 21:08
  • 1
    Normally, No. But if the library has extra Debugging support (logging) than that is a good reason to do the opposite. – H H Feb 28 '10 at 21:23
0

Also check out this article if you want a way to link to both. It shows up twice in your references folder but other than that minor aesthetic quality it works great.

How to include the right reference in C# using the "Browser" tab

Community
  • 1
  • 1
Corith Malin
  • 1,505
  • 10
  • 18
0

Any reason not to use project references as opposed to dll references?

Mark Sowul
  • 10,244
  • 1
  • 45
  • 51
  • Please see the comments to the accepted answer to this question http://stackoverflow.com/questions/2350989/methods-of-managing-source-code – Bryan Mar 08 '11 at 16:51
  • Projects can be branched or referenced by relative path just as effectively as .dlls.. – Mark Sowul Mar 09 '11 at 01:55