简体   繁体   English

如何在项目中包含 nuget 包以使项目可移植

[英]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.

相关问题 如何在 Jenkins 中使用 Nuget 包构建 VS 项目 - How to build VS project with Nuget packages in Jenkins 如何查找代码中引用但项目中未引用的 NuGet 包 - How to find NuGet packages referenced in code but not in project 如何将nuget包添加到共享项目 - How to add nuget packages to shared project 为WebAPI项目添加nuget包 - Adding nuget packages for a webapi project 该项目引用了此计算机上没有的NuGet软件包 - The project references NuGet packages that are not on this computer 带有解决方案,软件包和nuget的MVC 5项目 - MVC 5 project with solution, packages and nuget Nuget在“\\ .nuget \\ packages”中查找本地项目 - Nuget looking in “\.nuget\packages” for local project NuGet将项目依赖项打包为nuget依赖项 - NuGet packages project dependencies as nuget dependencies 错误:构建恢复了 NuGet 包。 再次构建项目以在构建中包含这些包。 想要查询更多的信息 - Error: The build restored NuGet packages. Build the project again to include these packages in the build. For more information 构建恢复了 NuGet 包。 再次构建项目以在构建中包含这些包 - The build restored NuGet packages. Build the project again to include these packages in the build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM