[英]How to include nuget packages in a project to make the project portable
According to this , I decided to use nuget in the project.根据此,我决定在项目中使用的NuGet。 I would like to make it "portable" - add the used packages in the git repository and requiering no internet connection on the server side.
我想让它“便携” - 在 git 存储库中添加使用过的包,并且在服务器端不需要互联网连接。 What is the way to do it?
有什么方法可以做到?
You should add path to the local copy of the repository, your NuGet location to the Options -> NuGet Package Manager -> Package Sources and install the NuGet from this location instead of installing it from the server or anywhere else.您应该将路径添加到存储库的本地副本,将您的 NuGet 位置添加到选项 -> NuGet 包管理器 -> 包源并从该位置安装 NuGet,而不是从服务器或其他任何地方安装它。
Having the location of your NuGet files inside the NuGet.config file which is used by Visual Studio when building the project, will download the needed packages from the specified location.将 NuGet 文件的位置放在 Visual Studio 在生成项目时使用的 NuGet.config 文件中,将从指定位置下载所需的包。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.