NuGet auto package restore does not work with MSBuild

后端 未结 12 2283
粉色の甜心
粉色の甜心 2020-12-02 08:51

I\'m trying to build a solution with packages content missing (except repositories.config inside) with MSBuild 12.0. I expect it to auto restore al

12条回答
  •  时光取名叫无心
    2020-12-02 09:21

    Sometimes this occurs when you have the folder of the package you are trying to restore inside the "packages" folder (i.e. "Packages/EntityFramework.6.0.0/") but the "DLLs" are not inside it (most of the version control systems automatically ignore ".dll" files). This occurs because before NuGet tries to restore each package it checks if the folders already exist, so if it exists, NuGet assumes that the "dll" is inside it. So if this is the problem for you just delete the folder that NuGet will restore it correctly.

提交回复
热议问题