NuGet软件包还原网站 [英] NuGet Package restore for website

查看:134
本文介绍了NuGet软件包还原网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将NuGet软件包还原与 VS2010 + Visual Sourcesafe 一起使用.它对我来说部分起作用. 它来自哪里: NuGet不会丢失包

I am trying to use NuGet Package Restore with VS2010 + Visual Sourcesafe. It is working partially for me. Where this is coming from: NuGet not getting missing packages

我的Solution2拥有asp.net网站[上图中的Project1],该网站安装了另一个nuget软件包.现在,另一位开发人员通过VS2010打开了Solution2,自动还原可用于Solution1中的Library项目.它会获取此Solution2中引用的所有图书馆项目缺少的软件包,我在Solution1/packages文件夹中看到它们.

My Solution2 has asp.net website[Project1 in above image] that has another nuget package installed. Now another developer opens the Solution2 via VS2010, the automatic restore works for Library projects in Solution1. It gets all missing packages for Library projects that is referenced in this Solution2 and I see them in Solution1/packages folder.

但是对于网站,它说外部dll,即丢失了pacakages.我认为问题是因为网站没有.csproj文件,因此它不知道需要还原的内容.( http://nuget.codeplex.com/workitem/1663 )

But for Website it says external dlls i.e. pacakages missing. The issue I think is because website doesn't have a .csproj file and so it doesn't know things needs to be restored.(http://nuget.codeplex.com/workitem/1663)

使其部分起作用:

另一个开发人员转到VSS并手动获取该packages文件夹.现在,当他构建解决方案时,程序包管理器控制台会提示您进行还原,即具有还原"按钮.单击它会带来AjaxControlToolkit.

Another developer goes to VSS and get that packages folder manually. Now when he builds the solution, the Package Manager Console prompts for restore i.e. has "Restore" button. On clicking it will bring the AjaxControlToolkit.

问题: -以上方法是唯一,最适用于网站的方法吗?

Questions: - Is the above approach the only and best available for Websites?

  • 当开发人员单击恢复"按钮时,它将带库的软件包以及Solution和nuget软件包一起带到Solution1/软件包.出于什么原因会这么做?

关于上述问题有什么想法吗?

Any ideas on above issues?

推荐答案

为了将带有repositories.config的解决方案级别的"packages"文件夹添加到VS Solution Explorer,我创建了一个Solution文件夹并添加了repositories.config.

For adding Solution level "packages" folder with repositories.config to VS Solution Explorer, I created a Solution folder and added repositories.config.

当我签入解决方案时,在SourceSafe中创建了packages文件夹.

That created packages folder in the SourceSafe when I checked-in the solution.

我还发现有人指向相同的此处的内容

I also found someone pointing the same thing here.

更新:我认为较新的nuget正在还原软件包.但是,另一种技巧是让nuget将dll添加到bin文件夹中,以便检入AjaxControlToolkit及其相关程序包的.refresh文件.

Update: I think the newer nuget is restoring the packages. But one other trick for nuget to add the dll to the bin folder it to check-in the .refresh files for AjaxControlToolkit and its dependent packages.

这篇关于NuGet软件包还原网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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