NuGet Pack - Failed to get information from a remote source

I am trying to run:

nuget pack project.csproj

but because of the project directory structure:

A \ B \ C \ Project

he continues to say:

NuGet.Protocol.Core.Types.FatalProtocolException: Failed to get information from the remote source "A \ B \ Packages", which must be "A \ Packages". How to change where NuGet looks for packages when dependencies are established.

I tried putting NuGet.config in both the project directory and the Solution (in .nuget). I added this to the file:

<config>
    <add key="repositoryPath" value="A\Packages" />
</config>

in both places, and that didn't matter (he always says A \ B \ Packages).

+4
source share
4 answers

The error is a bit strange, but already mentioned here .

, NuGet , .csproj.

, .sln .

, , (open cmd ):

cd <your .csproj location>
mklink /d packages "C:\path\to\actual\packages"

, NuGet , .

+4

, NuGet.config .

+3

, nuget . .sln, . A\B .sln, nuget , .

+1

OSX nuget .

Run the following in the project folder to make nuget read from the parent (solution) directory, which has the package folder:

ln -s ../packages packages
0
source

Source: https://habr.com/ru/post/1659231/


All Articles