Fable icon indicating copy to clipboard operation
Fable copied to clipboard

"dotnet new -i Fable.Template" returns 404 error

Open a688 opened this issue 9 years ago • 9 comments

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

a688 avatar Oct 03 '17 01:10 a688

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?

inosik avatar Oct 03 '17 08:10 inosik

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.

a688 avatar Oct 03 '17 12:10 a688

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 avatar Oct 03 '17 12:10 a688

@a688 Unfortunately I don't have much of a clue. It seems this should be reported to Nuget or dotnet CLI repos 😕

alfonsogarciacaro avatar Oct 03 '17 12:10 alfonsogarciacaro

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.

a688 avatar Oct 03 '17 14:10 a688

Great, I'm happy to see you fixed it :smile: Thanks a lot for the confirmation!

alfonsogarciacaro avatar Oct 03 '17 15:10 alfonsogarciacaro

Did you remove nuget.org before adding the other feed URL? If not, this looks like a bug to me.

inosik avatar Oct 03 '17 16:10 inosik

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.

a688 avatar Oct 03 '17 16:10 a688

Then you probably should report this at dotnet/templating.

inosik avatar Oct 03 '17 18:10 inosik