Debug / Release Versions

Apr 27, 2011 at 10:06 PM

Is there a way that a NuGet package can contain both a debug and a release versions of an assembly?

Coordinator
Apr 27, 2011 at 10:09 PM

Not today. What would you expect to happen if it did?

Apr 27, 2011 at 10:14 PM

Well, one of the DLL's that I'm creating a package for is C++/CLI wrapping pure C++.  If the references do not match between debug / release it blows up in production with some nasty exceptions because the data structures are different sizes.  I don't know if you have access to the attributes when adding references to the project but it is possible to map them to configuration names such as:

<Reference Include="MyUtilities.Debug" Condition=="'$(Configuration)'=='Debug'"/>

Inside the NuGet package you could then allow for a specific configuration when adding the lib files.

May 9, 2011 at 3:44 PM

I second sbehnke, we have exactly the same need.
Looking for a "maven like" .NET dependencies system, we started to use NuGet to manage external dependencies ; and so we setup a local repository to store and deliver it.

Then we extend it for internal libraries, setting up another repository for internal dependencies. And it just become painful to debug a complex project when the bug occurs in a dependency...

I think it's missing to NuGet a context-based dependency functionality which would add much more flexibility to the final solution.