Questions tagged [dotnet-restore]
47 questions
23
votes
2 answers
Nothing to do. None of the projects specified contain packages to restore
I have a web app in dot net along with other projects. when i open the .sln file and publish the web project, it does. But, when I try to publish the web proj using command line and .csproj, it gives an error. "Nothing to do. None of the projects…

Suleman Mehmood
- 391
- 1
- 5
- 14
17
votes
4 answers
Dotnet Restore fails in docker build
Hello i am trying to dockerize a ASP NET Core 2.1 application and the docker build fails when it executes dotnet restore.
I have already checked other threads for this specific problem Nuget connection attempt failed "Unable to load the service…

Bercovici Adrian
- 8,794
- 17
- 73
- 152
9
votes
2 answers
How to force nuget to take latest build of a package?
I have a problem with nuget getting the first build of a specifik assembly version, not the latest build. Here are steps that explain what is going on:
Removing local nuget cache.
Delete project.lock.json files in project.
Checking build number…

FatAlbert
- 4,890
- 6
- 22
- 34
8
votes
4 answers
Dependency specified was X but ended up with Y
I've updated a class library's project.json to target netstandard1.3 and net64.
With that change:
$ dotnet restore
log : Restoring packages
warn : Dependency specified was NETStandard.Library (>= 1.3.0) but ended up with
NETStandard.Library…

Drew Noakes
- 300,895
- 165
- 679
- 742
7
votes
2 answers
How to use an API Key with dotnet restore with private NuGet server
I've created a private NuGet server (https://github.com/ai-traders/liget) which requires an API key to upload packages but not to download/restore them.
I am sure I can enhance the code of the server to mandate the use of an API Key when restoring,…

Paul Grenyer
- 1,713
- 3
- 30
- 51
7
votes
1 answer
Force download of specific nuget package to local packages folder
I have a .NET Core Visual Studio 2017 solution that references Json.Net 12.0.1. Everything works great in my dev environment. When I run dotnet restore, Json.Net is downloaded to Newtonsoft.Json.12.0.1 in the solutions packages folder.
However, when…

christok
- 1,087
- 2
- 12
- 29
7
votes
2 answers
dotnet restore failing - Unable to load the service index for source [package name]
I have a build in VSTS which is failing with the following error:
error : Unable to load the service index for source [source name] 2018-02-28T09:04:12.1080070Z /usr/share/dotnet/sdk/1.1.4/NuGet.targets(102,5)
error : Response status code does…

Meitsrik
- 91
- 1
- 7
6
votes
4 answers
How to run dotnet test on VSTS with custom NuGet feed?
We have a project with a dependency on a custom NuGet feed (also hosted in VSTS).
I'm trying to put together a new phase to generate code coverage reports, as in this blog post. My new phase looks like this:
And is made up of the following…

Tom Wright
- 11,278
- 15
- 74
- 148
5
votes
1 answer
asp.net core docker issue on dotnet restore
I am new to docker and I developed a simple asp.net core webapi solution which uses a NuGet package from a private repository.
dotnet restore command returns an error for a missing NuGet package that is located inside a private repository which…

DjBuddy
- 171
- 1
- 4
- 14
4
votes
2 answers
Nuget restore on Docker from private feed
I have my application defined by this Dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
COPY ["MyCertificate.cer", "/usr/local/share/ca-certificates/cacert.crt"]
RUN…

Valerie Linc
- 2,811
- 3
- 14
- 12
4
votes
1 answer
Unable to authenticate with AWS CodeArtifact from a GitHub action
I'm unable to authenticate to AWS CodeArtifact from within a GitHub action. The AWS response is always 401.
I'm doing the following steps:
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
…

Pure.Krome
- 84,693
- 113
- 396
- 647
4
votes
0 answers
MSBUILD : error MSB1009: Project file does not exist when building docker file for an ASP.NET Core API application
I am trying to build a docker image for an ASP.NET Core 3.1 application and I fail to restore the packages. My solution has multiple projects and after copying all the project files, I am trying to create a layer which contains restored dependencies…

Alexei - check Codidact
- 22,016
- 16
- 145
- 164
4
votes
1 answer
Do Nuget.config credentials get cached? And where?
First I add my package source (test).

cassonchris
- 81
- 1
- 7
4
votes
0 answers
Detected package downgrade: System.Runtime from 4.3.1 to 4.3.0
.NET Core 2.2.0
TeamCity Professional 2019.1.2 (build 66342)
build step .NET CLI dotnet restore
error NU1605: Detected package downgrade: System.Runtime from 4.3.1 to 4.3.0. Reference the package directly from the project to select a different…

BaltoStar
- 8,165
- 17
- 59
- 91