在项目级文件夹中安装Nuget包 [英] Installing Nuget packages at project level folder

查看:50
本文介绍了在项目级文件夹中安装Nuget包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$ b $我有一个.NET解决方案,VS2015中的项目很少。每个项目都使用一个或多个Nuget包。对于每个项目,我添加了一个具有以下设置的Nuget.config文件:

Hi, I have a .NET solution with few projects in VS2015. Each of these projects consume 1 or more Nuget packages. To each project, I have added a Nuget.config file which has this setting:

<config>
    <add key="repositoryPath" value=".\packages" />
  </config>



意图是在项目级别包文件夹中安装包。这是我们需要采用的短期解决方案,直到我们在当前的版本控制系统中。一旦我们在几个季度内迁移到TFVC,在
项目级别包文件夹中安装包的限制将会消失。但截至目前,由于某些设计限制,我们需要在项目级别存储包。但是当我通过Visual Studio软件包管理器安装软件包时,它们仍然安装在解决方案级别的
软件包文件夹中。这些是项目级别的包,因为它们在lib目录中有文件。因此,每当我安装它们时,项目级别的packages.config文件会相应更新,但位置仍处于解决方案级别.VS包管理器似乎没有
读取项目级别的nuget.config在项目的目标文件夹中水平。请帮忙。

Intent is to install packages in project level packages folder. This is a short term solution which we need to adopt till we are in our current version control system. Once we migrate to TFVC in couple of quarters, this limitation of installing packages at project level packages folder will go away. But as of now due to certain design constraints, we need to store packages at the project level. But when I install packages through Visual Studio package manager, they are still getting installed in solution level packages folder. These are project level packages as they have files in lib directories. So whenever I install them, packages.config file at the project level gets updated accordingly but the location is still at solution level.VS Package manager doesn't seem to read project level nuget.config at have destination folder at project level. Pls help.


谢谢


Sandeep

Sandeep

推荐答案

Hi Sunny1704,

Hi Sunny1704,

此论坛讨论并询问有关扩展和与Visual Studio集成的问题,因为您的问题与Visual Studio general相关,我们会将其移至vs一般论坛以获得适当的支持。

This forum discusses and asks questions about extending and integrating with Visual Studio, Since your issue is more related visual studio general, we'll move it to vs general forum for suitable support.

感谢您的理解与合作。

致以最诚挚的问候,

Cole Wu


这篇关于在项目级文件夹中安装Nuget包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆