Nuget recovery error: this folder contains more than one solution file

I have this structure of decisions and projects:

projects
|--.nuget
|  |--packages.config
|
|--projFolderA
|  |--projectA.csproj  
|  
|--projFolderB
|  |--projectB.csproj  
|
|--projFolderC
|  |--projectC.csproj  
|    
|--solutionAB.sln
|--solutionBC.sln
|--solutionCA.sln

Each solution is configured to use some libraries using nuget. Now when I run:, nuget restoreI got this error: This folder contains more than one solution file.But if I open every solution in VS2013, then that will be fine.

These are the nuget settings in each of my * .sln file:

Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{334B5D1D-8694-472B-8170-3D36A395DCEF}"
    ProjectSection(SolutionItems) = preProject
        .nuget\packages.config = .nuget\packages.config
    EndProjectSection
EndProject

What did I do wrong? How can I run nuget restorefrom the console in this case?

+4
source share
1 answer

Try nuget restore solutionABC.sln

See https://docs.nuget.org/consume/command-line-reference

Below you will find a section on the blog about why you got the error.

Restore team notes

restore :

restore.

packages.config, nuget , packages.config.

, nuget . nuget .

, .

, nuget *.sln . , . nuget .

, nuget . , nuget . , nuget.

, nuget packages.config . , nuget , packages.config.

package.config, , nuget .

, -SolutionDirectory . nuget .

+16

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


All Articles