Support install EXE nuget packages

Please enable support for "Command Line" like nuget packages, these package contains EXE.
For example: after installing package 7-Zip.CommandLine, so I can *make sure* there is a 7zip.exe on my machine, should be at %LocalAppData%\LINQPad\NuGet.FW46. So I can then call this command line tool with Util.Cmd

Same other command line nuget package includes:
https://www.nuget.org/packages/FFmpeg.Win64.Static/
https://www.nuget.org/packages/Selenium.Chrome.WebDriver/
A topic related before:
http://forum.linqpad.net/discussion/1699/using-webdriver-in-linqpad-is-pain/p1

Comments

  • This is timely, because I'm currently re-writing the NuGet integration in LINQPad 6. The new downloader generates a warning rather than an error when there are no usable assemblies, so you can successfully download packages that contain just tools.

    I will also add a method to the NuGetReference class called "GetPackageFolders" to make it easier to find the target folder, so you can do this in the case of 7zip:
    string packageFolder = Util.CurrentQuery.NuGetReferences
        .First (r => r.PackageID.Equals ("7-Zip.CommandLine", StringComparison.OrdinalIgnoreCase))
        .GetPackageFolders()
        .Single();
        
    string exePath = Path.Combine (packageFolder, "tools", "7za.exe");
    exePath will then be set to this:

    %userprofile%\.nuget\packages\7-zip.commandline\18.1.0\tools\7za.exe

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!