May 19, 2011

Tip : how to identify which dll to reference?



I had a bad experience today.
I was moving a project from one PC to another, it was referencing dlls from my old PC.

I started to remove references one by one and adding them again, this time from a common location.
I missed on of them (deleted it from the project without first remembering which one it was).

So lesson number one - you can create a screenshot before deleting the references so you can restore them later.

But here is how I did I found the reference I needed (in my case I wasn't quite sure in which assembly was the RadWindow for Silverlight):

1. Go to your project and open some of the files the control resides.
2. Open the Toolbox (View => Toolbox).
3. Find the control in the toolbox and drag it to the design surfice.

In most cases Visual Studio will create a reference to the correct dll.