"dotnet new -i Fable.Template" returns 404 error
Description
Can't install Fable template
Repro code
dotnet new -i Fable.Template
Expected and actual results
Should install the Fable template, however it only returns 404s: Restoring packages for C:\Users<user>.templateengine\dotnetcli\v2.0.2-vspre-006935\scratch\restore.csproj... Retrying 'FindPackagesByIdAsyncCore' for source 'https://dotnet.myget.org/F/fsharp/vsix/FindPackagesById()?id='Fable.Template''. Response status code does not indicate success: 404 (Not Found). Retrying 'FindPackagesByIdAsyncCore' for source 'https://dotnet.myget.org/F/fsharp/vsix/FindPackagesById()?id='Fable.Template''. Response status code does not indicate success: 404 (Not Found). C:\Program Files\dotnet\sdk\2.0.2-vspre-006935\NuGet.targets(102,5): error : Failed to retrieve information about 'Fable.Template' from remo te source 'https://dotnet.myget.org/F/fsharp/vsix/FindPackagesById()?id='Fable.Template''. [C:\Users<user>.templateengine\dotnetcli\v2.0.2- vspre-006935\scratch\restore.csproj] C:\Program Files\dotnet\sdk\2.0.2-vspre-006935\NuGet.targets(102,5): error : Response status code does not indicate success: 404 (Not Foun d). [C:\Users<user>.templateengine\dotnetcli\v2.0.2-vspre-006935\scratch\restore.csproj]
Related information
PS C:\WINDOWS\system32> dotnet --version 2.0.2-vspre-006935
Windows 10 build 17004
It seems to be only querying https://dotnet.myget.org/, but the templates are at https://nuget.org. Do you have a global NuGet.config file which overrides the sources? Maybe the prerelease version of the .NET SDK is configured that way by default?
I do have a global NuGet.config file (apparently thanks to Visual Studio). However, myget is not listed in it at all so I have no idea that is where dotnet is looking.
Interestingly enough, on my work pc where I have version 2.0.2-vspre-006949 installed, it did work. What file(s) should I compare to figure out what is different?
@a688 Unfortunately I don't have much of a clue. It seems this should be reported to Nuget or dotnet CLI repos 😕
I finally figured out what happened. On the computer where I couldn't install Fable, I added the nightly Visual F# Tools visx path to my nuget manager in visual studio (which points to https://dotnet.myget.org/F/fsharp/visx). I removed that reference from the nuget manager and then I could successfully install the Fable template.
Great, I'm happy to see you fixed it :smile: Thanks a lot for the confirmation!
Did you remove nuget.org before adding the other feed URL? If not, this looks like a bug to me.
Nope. I have the default nuget.org entry (https://api.nuget.org/v3/index.json), a local file path I used for testing something a while back, and the F# nightly one (until I removed it).
I did all of my package source modifications in VS 2017 so it was responsible for updating whatever file(s) it uses to track that information.
Then you probably should report this at dotnet/templating.