How to add a reference to an assembly in LINQPad to access custom types?
.NetLinqpad.Net Problem Overview
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.
.Net Solutions
Solution 1 - .Net
Just press F4.
This will pop up the Add Reference
dialog.
Solution 2 - .Net
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:
Solution 3 - .Net
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
Other way to access this tab is by the top menu Query
> Namespace Imports
Solution 4 - .Net
I had to do fn and F4 at the same time.