`#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 #load
s in other modules. One of the #load
ed 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 #load
ed module, but did not run it. Double-checked the nuget packages to insure RestSharp was the latest (it was). Closed the #load
ed 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 #load
ed 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
#load
ed file is updated (let me know if this is not the case).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.