0
votes

I have a big solution with 100 projects in it (mostly class libraries). I found a strange behavior during building a release version. After building a release version I got debug version of some my libraries in bin/Release folder. For many libraries I got correctly release version, but for some I got only debug (DateTime differ and debug code present into Reflector). I checked all project properties, there are no problems and no differences between projects. What I need to do to change this behavior of Visual Studio?

Update: For example, lets my solution consists of three projects:

  • Project1
  • Project2 (reference Project1)
  • Project3 (reference Project2)

If I build this in release mode I get in Project3\bin\Release directory next builds:

  • Project1 (Debug)
  • Project2 (Release)
  • Project3 (Release)

But! In Project1\bin\Release there is a RELEASE build.

So I assume, that if Project3 don't reference Project1 directly, than MSBuild use debug version of Project1 for build. Can you suggest any solution except reference all not referenced directly libraries?

1

1 Answers

1
votes

Check the Configuration screen to see whether you solution "release" configuration is configured to build some "debug" configurations for a number of projects.

As you can see in this screenshot, they don't have to be configured the same for both levels.

Solution and project configuration mismatch See: http://msdn.microsoft.com/en-us/library/vstudio/kkz9kefa.aspx

I suspect you've already checked all these properties, but might have missed some options?

All debug related properties

If all else fails, have you tried to do a Clean build or a build from the commandline to verify that at least that works?