Reputation: 2797
create an FSharp fsx script, type this:
#r "nuget: FSharp.Data"
get
Error FS3217 ...: error NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/.../index.json. F# Miscellaneous Files ...\Script.fsx 1 Active
I suspect this is because i have a custom Nuget source defined in addition to nuget.org, is there a way I can force the script to just look in a nuget.org?
I find the nuget client configuration at best confusing.
Upvotes: 0
Views: 265
Reputation: 2797
I'm using visual studio 2022
I fixed it by disabling the other sources
Tools->Manage Packages for solution-> package source setting icon
disable the ones you don't want
RESTART visual studio
then it will work
it would be nice if you could specify the package source in the script, i find nuget config a bit of a black art, and I'd rather control explicitly in the script that have to change config (which i will inevitably change back and forget)
Upvotes: 1