miron
miron

Reputation: 721

How to add a reference to an assembly in LINQPad to access custom types?

Is there a posibility to add a reference to an assembly in LINQPad?

I have some types in my assembly and I would like to use them in my LINQPad queries.

Upvotes: 61

Views: 29271

Answers (4)

Luxant
Luxant

Reputation: 201

This doesn't apply to your case but may be helpful for others that had the same issue as me. My issue was with a "missing" system type (Task<T>) since LinqPad didn't had the using it by default. One way to add it on LinqPad is pressing F4 > Namespace Imports tabs and adding at the bottom of the list System.Threading.Tasks then press Ok.

You can also set this new list as the default for the new queries pressing Set as default for new queries

Go by shortcut

Other way to access this tab is by the top menu Query > Namespace Imports

Go by the query menu

Upvotes: 6

SSD
SSD

Reputation: 1391

You can also use the menu option to access the popup window to add references.

  • Notice the >> arrows in menu bar. Click on it.

  • Go to Query menu. Find References and Properties. Click on it.

Following is example image from LINQPad 5:

enter image description here

Upvotes: 7

thedanotto
thedanotto

Reputation: 7307

I had to do fn and F4 at the same time.

Upvotes: -5

sloth
sloth

Reputation: 101032

Just press F4.

This will pop up the Add Reference dialog.


Add reference to linqpad

Upvotes: 104

Related Questions