问题描述
当我拥有 Visual C# 2010 Express 时,如何使用 NuGet 添加库包引用?
How can I use NuGet to add a library package reference, when I have Visual C# 2010 Express?
当我在工具 > 扩展管理器中搜索 NuGet 时,它没有出现.
NuGet doesn't come up when I search for it in Tools > Extension Manager.
我从下载页面下载了NuGet 包管理器"(.vsix),但是当它提示我要集成到哪个版本的 Visual Studio 时,它只列出了 Visual Web Developer Express 2010.没有显示 Visual C# Express.所以我想它可以与 VWD 中的 Silverlight 一起使用,但我想将它与 WPF 一起使用.
I downloaded "NuGet Package Manager" (the .vsix) from the downloads page, but when it prompts me for which versions of Visual studio to integrate into, it only lists Visual Web Developer Express 2010. Visual C# Express isn't shown. So I guess it would work with Silverlight in VWD, but I want to use it with WPF.
其中一个文档页面将我链接到 1.0 CTP 下载页面,其中包括NuGet 的命令行版本(最新版本中不再存在).但是命令行版本似乎被削弱了——它似乎支持的唯一操作是构建一个用于分发的包;它似乎不支持添加对库包的引用的命令.
One of the documentation pages linked me to the 1.0 CTP download page, which included a command-line version of NuGet (no longer present in the latest version). But the command-line version seems to be crippled -- the only operation it seems to support is building a package for distribution; it doesn't seem to support the commands for adding a reference to a library package.
有没有办法将 NuGet 与 Visual C# Express 一起使用?
Is there any way at all to use NuGet with Visual C# Express?
推荐答案
更新 (9/12/2012): 好消息:Visual Studio Express 2012 for Windows Desktop 现已推出 (这里),它支持开箱即用的 NuGet.总的来说,现在 VS2012 的每个版本都支持 NuGet,所以这个限制应该已经过去了!
Update (9/12/2012): Good news: Visual Studio Express 2012 for Windows Desktop is now available (here), and it supports NuGet out of the box. Generally speaking, every edition of VS2012 now supports NuGet, so this limitation should be a thing of the past!
原答案:
Microsoft 以允许其与 VWD Express 一起使用的方式签署 NuGet.理想情况下,它也会以与 C# Express 一起使用的方式进行签名(它可能必须是单独的构建).不幸的是,我们无法在初始版本中做到这一点(这比您想象的更具挑战性).
Microsoft signs NuGet in a way that allows it to work with VWD Express. Ideally, it would also be signed in a way that it works with C# Express (it may have to be a separate build). Unfortunately, we were not able to do this for the initial release (it's more of a challenge than you might think).
今后,我们将尝试启用此方案.请随意在 NuGet 网站上提交错误,以便让受影响的其他人有机会投票!
Going forward, we will try to enable this scenario. Feel free to file a bug on the NuGet site just to let others who are affected a chance to vote it up!
这篇关于如何将 NuGet 与 Visual C# Express 一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!