A B
A B

Reputation: 343

Add references manually

Is there anyway I can make the process of adding references to C# projects less painful?

Every time I create a new C# class library project. I have to use the Add Reference dialog for 5 times at least.

Upvotes: 5

Views: 5411

Answers (5)

BALKANGraph
BALKANGraph

Reputation: 2041

Another way of doing this is to use Muse VSRefrences. This VSExtension has support for Copy and Paste references, also has fastest "Add GAC Reference" dialog

alt text

Give it a try and let me know if you have other questions

s

Upvotes: 0

Dmitrii Lobanov
Dmitrii Lobanov

Reputation: 4977

You can install Resharper, last versions have improved usability if you mention some class in your code, but don't have reference to library with this class. In such case Resharper will offer you to add library reference and to import particular namespace. All you need to do is to click CTRL+Enter, and select from drop down menu "Reference library and import namespace". You will touch your keyboard only twice and Resharper will do the rest! Resharper really let you fully concentrate on writing good code without distraction with trifles.

Upvotes: 0

Mitch Wheat
Mitch Wheat

Reputation: 300559

Install the PowerCommands for Visual Studio. You can then simply copy and paste a bunch of references between projects (plus lots of other useful commands). Some of the other useful commands are:

  • Collapse Projects (my favourite)
  • Copy References and Paste References
  • Remove and Sort Usings
  • Open Containing Folder
  • Open Command Prompt

Upvotes: 7

Perry Neal
Perry Neal

Reputation: 765

If you have certain references that you always add to a project then create a new project, add the references, get the project set up like you normally would, and then select File > Export Template. Then when you next want to create a new project, your newly-created template will be listed under the My Templates section.

Upvotes: 0

tvanfosson
tvanfosson

Reputation: 532455

You can select more than one reference at a time to add using CTRL-Click. You can also use the Recent tab to find references that you've added recently to other projects easily.

Upvotes: 3

Related Questions