Home

`#load`ed nuget packages are not refreshed

I suspect the answer to this is "This is just the way it works. Reopen the linq file.", but...

Ran a code module I already had open. This particular bit of code was developed weeks ago and I run in periodically as needed. It typically stays open in LINQPad (which also typically says open). It #loads in other modules. One of the #loaded modules references RestSharp (v 111.4.0, IIRC). Upon running the base code, LINQPad kicked out a Level 1 warning about a vulnerability with that particular version of RestSharp. Went and checked my nuget packages to do updates and RestSharp is now at v112.0.0. Ran the code again and still received the warning.

RestSharp was not referenced in the main code module. Opened the #loaded module, but did not run it. Double-checked the nuget packages to insure RestSharp was the latest (it was). Closed the #loaded module. Ran main code module and the warning was still given. Reopened the main code module, ran the code, and now the warning is gone.

It appears LINQPad does not pull in indirectly referenced nuget packages upon running the main code module. I know LINQPad will pull in the updated code for a #loaded module (I've done this many times). I'd expect it to do the same for nuget packages.

Comments

  • I suspect the issue is related to the NuGet vulnerability cache. Indirectly referenced NuGet packages should update correctly when the #loaded file is updated (let me know if this is not the case).

  • edited September 3

    Perhaps they are, but the repeated display of the vulnerability message suggests not. I have no default insight into what Nuget packages are actually used by a query. Sure, the Nuget management page on what package should be used, but if LINQPad is actually caching the previously used package, I can't tell without a lot of hoop-jumping. If it's actually an issue with making sure vulnerability cache (which I had no idea was a thing) is updated, the basic report still stands.

Sign In or Register to comment.