Util.Compile with custom nuget source from console app
I'm wanting to use Util.Compile from a console app, but I notice that if the script being loaded has nuget packages from a private source then Util.Compile will fail, complaining it cant find the package. (this is running on a machine without linqpad installed, and just using the Linqpad.Runtime nuget package in the console app)
I can make it work by creating a %AppData%\LINQPad\NuGetSources.xml file on the executing machine,
But is there a way to add a nuget source via the LinqPad.Runtime API's, to avoid the above hack ?
Comments
I've hacked it via reflection over the NuGetSourceItem and NuGetClient classes which is suitable for my needs, but if there is an easier way do share.