Home
Options

NuGet linqpad-samples not working quite right in beta?

First off: Thanks! I think this is a fantastic idea and I love it. NuGet integration is one of my favorite features in LINQPad and being able to include scripts to demo, teach, explain, etc. is just brilliant. Even packages that are just scripts are an amazing idea.

Trying to put this into practice, I added a sample script to my NuGet package for ADSI and included the tag linqpad-samples but I can't seem to get the script to show up in the samples explorer.

After pushing the update to nuget.org, the NuGet Manager dialog added the green text "LINQPad Samples Available" below the package name and description to indicate it found the linqpad-samples tag but again the demo script doesn't seem to be included in the Samples UI for some reason. As expected, the behavior was roughly identical for a local repository (the output folder for the package) - green text below package name but no samples included.

I can inspect the downloaded .nupkg file in the %LocalAppData%\LINQPad\NuGet folder to see that the linqpad-samples\ADSI\ADSI Sample.linq file is present in the archive.

This is with beta version 4.50.01 - both x86 and AnyCPU versions.

Comments

  • Options
    I've reproduced your problem and am looking into this at the moment.
  • Options
    The sample query in your package is named "ADSI Sample.linq". It appears that the space is causing the problem and the name needs to be escaped, i.e., "ADSI%20Sample.linq".

    The nuget packaging tool performs this escaping automatically. What version of nuget.exe are you using? What happens if you run nuget update -self and repackage?
  • Options
    I am using nuget.exe version 2.8.2 - though I was having trouble with it packaging my linqpad-samples folder so I manually added those to the archive. I had no idea that spaces needed to be escaped.

    As an FYI, my nuspec file complains when I go to package this library: it doesn't want to substitute the $version$ and other variables if I don't use the .csproj as the source - I clearly need to iron out some bugs in my packaging script.
  • Options
    I have updated my official package and build steps after revisiting the NuGet nuspec file format page. It was as easy as adding the correct files tag to my nuspec file and then issuing a new "nuget pack ADSI.csproj" - thanks for steering me down the right path @JoeAlbahari‌!

    If anyone is curious, you can see the relevant diff and source files on the GitHub commit page: https://github.com/goyuix/ADSI/commit/759153e35dfa5c01479d868d9a0f6132a61ebf7b
Sign In or Register to comment.