NU-GET和放大器;问题与项目层面的依赖性由多个解决方案引用的项目 [英] Nu-Get & issue with project level dependences for projects referenced by multiple solutions

查看:172
本文介绍了NU-GET和放大器;问题与项目层面的依赖性由多个解决方案引用的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出最好的方式来处理这种情况是。

I'm trying to figure out what the best way to handle this scenario is.

让我们说我有一个是由多个不同的非相关的解决方案引用库,让我们称之为WebServiceInterface.dll。该库对JSON.NET的依赖。

Let's say I have a library that's referenced by multiple different non-related solutions, let's call it WebServiceInterface.dll. This library has a dependency on JSON.NET.

之前的NuGet

JSON.NET二进制文件通过SVN外部引用在WebServiceInterface项目。这对WebServiceInterface依赖其他解决方案中引用的项目(也为SVN外部),结果拉着两个项目,它的依赖关系。

The JSON.NET binary was referenced via a SVN external in the WebServiceInterface project. Other solutions which had a dependency on WebServiceInterface referenced the project (also as an SVN external) and as a result pulled both the project, and it's dependencies.

随着的NuGet

我还没有想出如何强制JSON.NET参考WebServiceInterface项目下存储(相对于RandomSolution\packages位置)。我发现参考@ NU-获得项目级和解决方案级pacakges,但我似乎无法找出如何指定,当我通过添加NU-得到的依赖。

I haven't figured out how to force the JSON.NET reference to be stored under the WebServiceInterface project (as opposed to the RandomSolution\packages location). I found reference @ nu-get to project-level and solution-level pacakges, but I can't seem to find out how to specify this when I add a dependency via nu-get.

这里的目标是,当有人取出WebServiceInterface并将其添加到它构建(而不必打破引用JSON.NET这点包一个新的解决方案目录下无论最后的解决方案是签入)。

The goal here is that when someone checks out WebServiceInterface and adds it to a new solution that it builds (instead of having broken references to JSON.NET which point to the packages directory under whatever the last solution was that checked in).

推荐答案

的包总是存储的在该解决方案的水平,因此,如果您安装一个包到多个项目,他们来自同一个地方。我不相信你可以配置它使每个项目都有其自己的包文件夹中。

The packages are always stored at the solution level, so if you install a package into multiple projects, they came from the same place. I don't believe you can configure it so that each project has its own packages folder.

我不知道有一个很好的方式做你想要什么。也许你可以有一个的打造上取包项目一步,但我不知道如何将适合你。

I'm not sure there's a nice way to do what you're trying. You could maybe have a build step on the project that fetches the package, but I don't know how well that will suit you.

我建议在的NuGet问题跟踪发布获得讨论会。它的工作的人似乎很活跃,所以它可能是东西,他们可以在未来的版本中添加了支持: - )

I'd recommend posting in the NuGet Issue Tracker to get a discussion going. The people working on it seem pretty active, so it might be something they can add support for in a future version :-)

这篇关于NU-GET和放大器;问题与项目层面的依赖性由多个解决方案引用的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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