NuGet的官方说明是:NuGet是一款Visual Studio的扩展,它可以简单的安装、升级开源库和工具。

官网地址: http://www.nuget.org/

官网最醒目的位置就是下载链接,安装完成后我们来快速体验一把。

手上有个小项目需要使用到json格式,一般情况我会先Google一下有没有相关的开源库(这个肯定是有的)。

然后从一些博文中发现了Json.net,然后继续Google之,找到Json.net的官网,然后下载最新的稳定版本,找出DLL文件引用它。

是不是很复杂?很繁琐?(其实没用NuGet之前我一直觉得这样干很方便的)

使用NuGet我们就可以很快搞定了。

右键Managet NuGet Packages

搜索json,然后看看结果和右侧的介绍,Json.net排在第一位,点Install安装。

然后等待下载完成,可以看到引用里面已经有了Json.net了。

那么NuGet到底干了什么呢?下载的开源库在何处呢?看一下输出结果就知道了。

在packages文件夹下可以找到相关dll文件。

还有命令行模式可以选用

还是以Json.net举例,输入Install-Package Newtonsoft.Json即可。

NuGet还有一个优势就是可以处理依赖(我个人觉得Net的依赖复杂程度没有java麻烦)。以Spring.Core为例子,它依赖Common.Logging。

自然NuGet完美解决了。

我没有试升级库功能,但是个人感觉NuGet还是有一些局限的。

首先需要联网(其实可以建立自己的服务器...我粗心了,谢谢了楼下各位了),其次是每次都下载新的,而且会把针对不同.Net版本的都down下来。

原文链接: http://www.cnblogs.com/htynkn/archive/2012/01/29/use_nuget_tools.html

善用VS2015 NuGet Manager解决方案管理功能

NuGet已经是Visual Studio写专案时的柴米油盐酱醋茶了,但有些人可能没发现在解决方案(.sln,Solution)层也可以开启NuGet Manager。 如下图,在Solution Explorer的.sln开右键选单,有一个「Manage NuGet Packages for Solution…」:

NuGet的官方说明是:NuGet是一款Visual Studio的扩展,它可以简单的安装、升级开源库和工具。官网地址:http://www.nuget.org/官网最醒目的位置就是下载链接,安装完成后我们来快速体验一把。手上有个小项目需要使用到json格式,一般情况我会先Google一下有没有相关的开源库(这个肯定是有的)。然后从一些博文中发现了Json.net,
Mastering Visual Studio 2019: Become proficient in .NET Framework and .NET Core by:using advanced coding techniques in Visual Studio , 2nd Edition eBook Details: Paperback: 374 pages Publisher: WOW! eBook (August 9, 2019) Language: English ISBN-10: 1789530091 ISBN-13: 978-1789530094 eBook Description: Mastering Visual Studio 2019, 2nd Edition: Explore the new features in Visual Studio 2019 and build apps using WPF, .NET Core, TypeScript, and Azure Visual Studio 2019 is the latest IDE from Microsoft for developers targeting Windows and other platforms to build stunning desktop, web and mobile applications. In this book, you’ll learn how to effectively use this IDE to build, debug, and test your applications to enhance productivity by simplifying your most common tasks and allowing more time to focus on other aspects of your project. Starting with an overview of the new features in Visual Studio 2019, you’ll understand what’s improved since its previous edition. This Visual Studio book will help you build applications for Windows using Windows Presentation Foundation (WPF), which provides a unified programming model for developing dynamic, rich, data-driven desktop applications. You’ll then learn about Microsoft’s implementation of cloud computing with Azure, followed by building applications using .NET Core and TypeScript. This book will also help you explore NuGet , the package manager for the Microsoft development platform, that enables you to create, publish, and consume packages from a central repository by managing a reference list of packages. Finally, you’ll delve into the debugging and live unit testing techniques that are built into the IDE. Increase your productivity with Visual Studio 2019’s new features Understand how the installation wizard works and create an offline installation package Build stunning applications using WPF, .NET Core, and TypeScript Explore NuGet packages in depth Accelerate cloud development with Azure Debug and test your applications efficiently Get to grips with integrating Visual Studio with Git repositories By the end of the Mastering Visual Studio 2019, Second Edition book, you’ll have become a more efficient Visual Studio 2019 user, and be able to use it for developing, testing, debugging and deploying your applications.
Mastering Visual Studio 2017 by Kunal Chowdhury English | 27 July 2017 | ISBN: 1787281906 | ASIN: B06X3QS36H | 466 Pages | AZW3 | 20.5 MB Key Features Focus on coding with the new, improved, and powerful tools of VS 2017 Master improved debugging and unit testing support capabilities Accelerate cloud development with the built-in Azure tools Book Description Visual Studio 2017 is the all-new IDE released by Microsoft for developers, targeting Microsoft and other platforms to build stunning Windows and web apps. Learning how to effectively use this technology can enhance your productivity while simplifying your most common tasks, allowing you more time to focus on your project. With this book, you will learn not only what VS 2017 offers, but also what it takes to put it to work for your projects. Visual Studio 2017 is packed with improvements that increase productivity, and this book will get you started with the new features introduced in Visual Studio 2017 IDE and C# 7.0. Next, you will learn to use XAML tools to build classic WPF apps, and UWP tools to build apps targeting Windows 10. Later, you will learn about .NET Core and then explore NuGet , the package manager for the Microsoft development platform. Then, you will familiarize yourself with the debugging and live unit testing techniques that comes with the IDE. Finally, you'll adapt Microsoft's implementation of cloud computing with Azure, and the Visual Studio integration with Source Control repositories. What you will learn Learn what's new in the Visual Studio 2017 IDE, C# 7.0, and how it will help developers to improve their productivity Learn the workloads and components of the new installation wizard and how to use the online and offline installer Build stunning Windows apps using Windows Presentation Foundation (WPF) and Universal Windows Platform (UWP) tools Get familiar with .NET Core and learn how to build apps targeting this new framework Explore everything about NuGet packages Debug and test
Visual Studio 2015 出现 NuGet 安装程序包过程中出现An error occurred while retrieving package metadata for 'XXX' from source ' nuget . org'. 错误的 解决方案 。 是由于 NuGet 的版本过高引起的错误, 解决方案 : 1.工具-> NuGet 管理 器->程序包 管理 设置->程序...
Visual Stdio 2015 安装Math.NET Numerics库 NuGet Tools安装Math.NET Numerics安装常见错误 NuGet Tools安装 在 VS 中选择工具—>扩展和更新—>联机—搜索 nuget —>下载 Math.NET Numerics安装 在 Visual Studio 2015 中,打开 Tools -> Nuget Package...
1:打开 vs 2015 ,Tools-> NuGet Package Manager ->Package Manager Settings 2:添加Package Sources(http://xxx.xx.xx/ nuget NuGet 服务器地址) 为了清除缓存干扰: Clear Nuget Cache.bat 转载于:https://www.cn...
位置 解决方案 资源 管理 器 窗口默认位于右上角。 它与另一个窗口 类视图 位于相同的位置。 打开 类视图 可以在菜单栏中选择 视图 | 类视图 即可打开该窗口。如下图: 解决方案 管理 器 窗口显示了组成 ConsoleApplication1 项目的文件,包括我们在其中添加代码的文件 Program.cs 和其它内容。 注意:所有 C# 代码文件都使用 .cs 文件扩展名。 现在不需要考虑除了 Pr
为了用 VS 2015 community中的 NuGet 获取Quartz,在【工具】-【 NuGet 管理 器】-【程序包 管理 器控制台】中执行 Install-Package Quartz。 却报如下错误: Update-Package : Unable to load the service index for source https://api. nuget .org/v3/index....
要在 Visual Studio 中连接MySQL,可以按照以下步骤进行操作: 1. 确保已安装MySQL Connector/NET。可以从MySQL官方网站下载并安装Connector/NET。 2. 在 Visual Studio 中创建一个新的项目,选择“Windows桌面应用程序”或“Web应用程序”。 3. 在“ 解决方案 资源 管理 器”中右键单击项目,选择“ 管理 NuGet 程序包”。 4. 在 NuGet 程序包 管理 器中搜索MySQL.Data,并安装MySQL.Data和MySQL.Data.Entity。 5. 在代码中添加MySQL.Data和MySQL.Data.Entity的引用。 6. 在代码中使用以下命名空间: using MySql.Data.MySqlClient; using System.Data.Entity; 7. 连接MySQL数据库时,可以使用类似以下的代码: string connectionString = "server=localhost;user id=root;password=password;database=database_name"; MySqlConnection connection = new MySqlConnection(connectionString); connection.Open(); 8. 如果要使用Entity Framework,可以在连接字符串中使用MySQL提供程序。例如: string connectionString = "server=localhost;user id=root;password=password;database=database_name;provider=MySql.Data.MySqlClient"; 以上是连接MySQL数据库的一些基本步骤,具体操作可以根据需要进行调整。