NuGet Package Restore Not Working

后端 未结 20 2067
情书的邮戳
情书的邮戳 2020-12-02 04:06

I checked in a project on one computer, checked out on another, and find that the binaries installed by NuGet are missing. I could check them in to source control as well,

20条回答
  •  死守一世寂寞
    2020-12-02 05:00

    Sometimes something strange happens and using Visual Studio to automatically restore doesn't work. In that case you can use the NuGet Package Manager Console. That is opened within Visual Studio from Tools -> NuGet Package Manager -> Package Manager Console. The commands within the console are simple. And to get context help while typing a command just press the button and it will give you all options that start with the letters you're typing. So if a package isn't installed, for example log4net, type the following command:

    Install-Package log4net

    You can do a whole lot more, like specify the version to install, update a package, uninstall a package, etc.

    I had to use the console to help me when Visual Studio was acting like a weirdo.

提交回复
热议问题