Tuesday, September 20, 2016

Differentiating between Project and Assembly References in Visual Studio

I was recently working on a project whereby I was encountering failed builds when the code was pushed up to our continuous integration server, but the build was successful when building on my local machine.

It took me a long time to try and figure out the root cause of this problem, but as it turned out, it had to deal with Project vs. Assembly References!

Unfortunately, in Visual Studio, as soon as you add a Project Reference to your Project, there is no EASY way to determine if a particular reference is a Project or an Assembly Reference!

The best way to try and check if you have a Project Reference is to right click on the References icon and select "Add Reference":


Then, once you have the dialog open, you can "guess" which projects are project references by looking at the checkboxes next to the corresponding project names.

As you can tell, this is a VERY, VERY tedious and error prone method of verifying and validating references in your project and across your solution.

Therefore, if you are like me and would prefer to have different icons for project references vs. assembly references in the Visual Studio IDE, you should definitely vote for this UserVoice item: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/4747824-different-icon-for-project-reference-and-assembly

No comments:

Post a Comment