views:

197

answers:

2

If I drag and drop an assembly, or use the Toolbox's "Choose items..." dialog, should I be choosing the debug or release version of my assemblies from their bin\ folders?

I.e. is Visual Studio clever enough to work out that when I want a release build it'll reference Release built assemblies?

A: 

I don't think it is... you'd have to talk to a VS expert to be certain. You can probably edit the project file to make it so. In any case, a Release assembly with PDB files is as debug-able as a debug assembly for the most part.

I would make it so that you are using whatever will go out to production/your customers. If the deployment environment gets release, I would always use release in the tool bar.

+1  A: 

Release build. The better approach to debug the control is to simply add the control project to your solution. After compiling, you'll automatically get the control at the top of the toolbox, ready to drop on a form. That also automatically adds the assembly reference.

Hans Passant
In addition, if you want to debug your control at design-time then check out "Walkthrough: Debugging Custom Windows Forms Controls at Design Time" at http://msdn.microsoft.com/en-us/library/5ytx0z24.aspx.
AMissico