.linq file using NugetReference from private/on-premise package repository?

edited July 2018
Is it possible to embed private package repository paths in a .linq file?

I'm trying to create a portable .linq file that contains embedded links to a private repository set up in our company. Many people in the company use LINQPad4 but do not have our relatively new NuGet repository listed in their %AppData%\LINQPad\NuGetSources.xml. As such when they open a .linq file with something like this at the top:

<Query Kind="Program"> <NuGetReference>MyCompany.OurPackageName</NuGetReference> <Namespace>MyCompany.OurPackageName</Namespace> </Query>

and they open it to run they then see the following sequence:
"This query requires the following NuGet packages: MyCompany.OurPackageName Download?"

and clicking "yes":
"Error downloading 'MyCompany.OurPackageName' - Unable to find package 'MyCompany.OurPackageName' OK"

I'm imagining something like this would be helpful here:
<Query Kind="Program"> <NuGetSource>\\mycompany\NuGet\packages</NuGetSource> <NuGetReference>MyCompany.OurPackageName</NuGetReference> <Namespace>MyCompany.OurPackageName</Namespace> </Query>


  • If you have not figured out, I had the same issue, I just copied the Newtonsoft.Json.dll from my local different app directory to the Framework assemblies directory C:\Users{user_name}\AppData\Local\Temp\LINQPad5\Temp Exports\AssemblySet1\Framework Assemblies of LinqPad5 and removed the NuGetReference from NuGet Package Manager, then closed and re-opened the LinqPad. All good from there.

Sign In or Register to comment.