Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a simple way to include a missing reference to an assembly in Visual Studio?

I'm using Visual Studio 2012. In most solutions I have lots of projects which reference each other.

It's quite time consuming to always add the reference manually.

Is there a simple way (either built-in or via extension) to include a missing reference to an assembly in the own solution similar to the way missing usings are resolved?

like image 728
Onur Avatar asked Apr 17 '15 16:04

Onur


People also ask

How do I add a missing assembly reference in Visual Studio?

Navigate to the startup project in solution explorer. Right click, properties > Application > Target framework. Change the target framework to anything else. Press Yes for the confirmation dialog.


1 Answers

Resharper does exactly this. If there's a class that is defined in another project in the solution, it offers you to reference that class and import the namespace. All you do is press "Alt+Enter, Enter" to pop up context menu and select the first option.

like image 112
FarmerBob Avatar answered Oct 13 '22 00:10

FarmerBob