Reputation: 23
I'm just starting with Microsoft Visual Studio and F#.
I have followed their tutorial as close as I can but when I try to run the code they tell me to I get the error:
NU1101: Unable to find package FSharp.Core. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages
the entire code I have in the file looks like:
module HelloSquare
let square x = x * x
[<EntryPoint>]
let main argv =
printfn "%d squared is: %d!" 12 (square 12)
0 // Return an integer exit code
How can i fix this? Any help would be appreciated and I absolutely am willing to provide more info if it will help tackle the problem.
edit: its a .NET core project
here's the tutorial I'm following: https://learn.microsoft.com/en-us/dotnet/fsharp/get-started/get-started-visual-studio
here is the installation tutorial i followed I did the visual studio section, not the visual studio code, mac, or servers sections: https://learn.microsoft.com/en-us/dotnet/fsharp/get-started/install-fsharp#install-f-with-visual-studio
How would I switch to online nuget source?
Upvotes: 2
Views: 1767
Reputation: 7543
Check that you have at least one nuget source configured using:
dotnet nuget list source
it should return something like:
Registered Sources:
1. nuget.org [Enabled]
https://api.nuget.org/v3/index.json
If you don't have any sources configured then use dotnet nuget add source to add one.
e.g.:
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
I think this may be an issue with current version of dotnet core (5.0.6)
Upvotes: 8