when trying to run command " dotnet restore" in visual studio code..
Mitkari opened this issue · 3 comments
I downloaded your given application from GitHub, & tried to run application , it shows this error...
D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript-master\src\PhotoGallery>dotnet restore
Restoring packages for D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript-master\src\PhotoGallery\PhotoGallery.csproj...
Restoring packages for D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript-master\src\PhotoGallery\PhotoGallery.csproj...
Restoring packages for D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript-master\src\PhotoGallery\PhotoGallery.csproj...
Restoring packages for D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript-master\src\PhotoGallery\PhotoGallery.csproj...
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Extensions.SecretManager.Tools''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='AutoMapper.Data''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.Diagnostics''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.Authentication.Cookies''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.Server.IISIntegration''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.Server.Kestrel''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.StaticFiles''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.EntityFrameworkCore''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.EntityFrameworkCore.SqlServer''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.EntityFrameworkCore.Tools''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.EntityFrameworkCore.InMemory''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.Mvc.TagHelpers''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.Identity''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.NETCore.App''.
An error occurred while sending the request.
The server name or address could not be resolved
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : Failed to retrieve information about 'Microsoft.Extensions.SecretManager.Tools' from remote source 'htt
p://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Extensions.SecretManager.Tools''.\r [D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript-ma
ster\src\PhotoGallery\PhotoGallery.csproj]
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : An error occurred while sending the request.\r [D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript-m
aster\src\PhotoGallery\PhotoGallery.csproj]
C:\Program Files\dotnet\sdk\1.0.4\NuGet.targets(97,5): error : The server name or address could not be resolved [D:\Meghraj\Dot Net Core\aspnet5-angular2-typescript
-master\src\PhotoGallery\PhotoGallery.csproj]
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Extensions.Configuration.Json''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Extensions.Configuration.EnvironmentV
ariables''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.AspNetCore.Mvc''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Extensions.Configuration.Json''.
An error occurred while sending the request.
The server name or address could not be resolved
Retrying 'FindPackagesByIdAsyncCore' for source 'http://packages.nuget.org/v1/FeedService.svc/FindPackagesById()?id='Microsoft.Extensions.Configuration.EnvironmentV
ariables''.
An error occurred while sending the request.
The server name or address could not be resolved
@Mitkari I can't reproduce your error, the command works fine. What do you mean by "in visual studio code.." ? Just open a command line, navigate to src/Photogallery and run the command. Also, make sure you have the latest .NET Core installed.
@Mitkari
You are using an old version of the NuGet's feed packages.nuget.org/v1.
Create a NuGet.config
file in the project directory which contains the following:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
@VahidN
Thank you so much for sharing that solution. It worked for me.