Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft.AspNetCore.SpaTemplates won't install

Trying to follow this blog post where I have the proper SDK and node installed.

Running the command dotnet new --install Microsoft.AspNetCore.SpaTemplates::* gives me the error:

Restoring packages for C:\Users\xxxx.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj... Retrying 'FindPackagesByIdAsyncCore' for source 'https://ournugetserver/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''. Response status code does not indicate success: 401 (Unauthorized).
Retrying 'FindPackagesByIdAsyncCore' for source 'https://ournugetserver/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.SpaTemplates''. Response status code does not indicate success: 401 (Unauthorized).
Retrying 'FindPackagesByIdAsyncCore' for source 'https://tcypwv01/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.SpaTemplates''. Response status code does not indicate success: 401 (Unauthorized).
Retrying 'FindPackagesByIdAsyncCore' for source 'https://ournugetserver/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''. Response status code does not indicate success: 401 (Unauthorized). C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Failed to retrieve information about 'Microsoft.NETCore.App' from remote source 'https://ournugetserver/httpAuth/app/nuget/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''. [C:\Users\xxxxx.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj] C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error :
Response status code does not indicate success: 401 (Unauthorized). [C:\Users\xxxxx.templateengine\dotnetcli\v1.0.4\scratch\restore.csproj]

Seems related to our internal nuget server. I'm using VS 2017. Looking for a way to possibly force it to ignore our nuget server or force it to use the correct one?

like image 681
Steve Greene Avatar asked May 12 '17 16:05

Steve Greene


1 Answers

This issue is related to Nuget package source . By selecting only nuget.org (https://www.nuget.org/api/v2/) source helped me to resolve this issue. make sure, you don't have any other source selected . it was happening to me because with nuget.org , Glass Builder Server (http://build.glass.lu/guestAuth/app/nuget/v1/FeedService.svc) was also selected and it was looking package in Glass Builder Server .

like image 105
Ajit Avatar answered Oct 08 '22 06:10

Ajit