编程知识 cdmana.com

The use of vs nuget and the introduction of vs Code and Git

If you need to see more articles , Please search WeChat for official account csharp Programming , Need to enter C# Communication groups, please add WeChat z438679770, Remarks into group , I invite you into the group ! ! !

Link to this article :https://blog.csdn.net/shujudeliu/article/details/80335349

Reference link :

https://jingyan.baidu.com/article/3c343ff7fdce900d377963d7.html

One 、 What is? Nuget

Nuget yes ASP .NET Gallery A member of the .NuGet It's free 、 Open source package management development tool , Focus on .NET In the process of application development , Simply merge third-party component libraries .

When you need to share a development tool or library , Need to build a Nuget package, And put this package Put it in Nuget The site of . If you want to use a tool or library that someone else has already developed , Just get this from the site package, And install it into your own Visual Studio In projects or solutions .

NuGet It's more convenient to put some dll And documents ( Such as jquery) Add to the project , You don't need to copy from a file .

Why use NuGet

To put it simply NuGet It can be that our work is more convenient , When we need to reference some libraries in our project , such as JQuery、Newtonsoft.Json、log4net etc. , We need to download these libraries from the Internet , And then copy them into each project in turn , When some class libraries are updated, they have to be repeated again, which is very tedious , At this time, you can consider using NuGet To help us manage and update these libraries , Moreover, when updating the class library, it will automatically add the relevant references of the class library , Convenient to the extreme . Of course, some of the commonly used online class libraries are not updated very frequently, and even if a new version comes out, we don't have to keep it up to date , So it's not very helpful to us , Personally think that NuGet The biggest advantage is that you can build your own class library server , Think about it , There are a lot of projects in bigger companies , And then some of them are the whole group , Even the company's common class library , When these libraries are updated, we need to copy them to our project in turn , Even sometimes we don't know whether the versions in different projects are consistent , Sometimes one or two items forget to copy the update, and there is an inexplicable error , It's a headache , There is now a NuGet, The world is different from this .

git and nuget difference , Don't confuse :

Writing programs requires version control , Even personal projects are necessary . We are developing UWP APP When ,VS2015 Provided by default for Microsoft TFS and Git Support for . Considering now Git A fire , As a programmer of Microsoft department, I have to learn a little self-defense , To avoid being ridiculed by the guys in the open source world . Corn me Git It's also a rookie ( Also ask the old driver to give more advice ), Only use VS2015 and SourceTree In this way GUI Tool click button , But I believe I'm used to it SVN and TFS Children's shoes , It takes a little courage to learn something new , especially Git It's a trend , And it has greatly promoted the open source code .........

版权声明
本文为[Irving the procedural ape]所创,转载请带上原文链接,感谢

Scroll to Top