There are a few packages that I install 95% of the time I write any scripts in Linqpad. For instance, JSON.net, is a nuget package I install every single time, and RestSharp is a close second. So my question is, is there a way to set up Linqpad to install these nuget packages by default? If not, is there a way to add them to a collection so that they can easily be installed every time?
There are two ways:
Yet another option is via a code snippet. Right-click the editor and choose Create Code Snippet, then click the References checkbox to add the NuGet package. Whatever you name the snippet becomes a shortcut to add the package, so if you name the snippet json, you just type json
followed by the tab key, and it will add the package.