Nuget套餐有什么意义?

时间:2022-01-11 19:57:45

Maybe I'm doing something wrong or expressing pure ignorance here, but I can't really see how Nuget packages are beneficial? I recently decided to install a number of Nuget packages to replace the static DLLs in my application. When I inspect the folders that are created by the packages they seem to include many different versions of the DLL all nested under an array of sub directories.

也许我在做错事或在这里表达纯粹的无知,但我真的不知道Nuget包是如何有益的?我最近决定安装一些Nuget包来替换我的应用程序中的静态DLL。当我检查由包创建的文件夹时,它们似乎包含许多不同版本的DLL,它们都嵌套在子目录数组下。

Don't all these files, many of which appear to be redundant increase the overall size of the application and slow down the publish and deploy routine? Also which items should be placed into source control?

难道不是所有这些文件(其中许多似乎是冗余的)会增加应用程序的整体大小并减慢发布和部署例程吗?还应将哪些项目置于源代码管理中?

Like I said I may be missing something here but can anybody enlighten me on the virtues of Nuget packages? I'm starting to think that a simple dll in the bin folder worked perfectly fine?

就像我说的那样,我可能会在这里遗漏一些东西,但任何人都可以了解Nuget包的优点吗?我开始认为bin文件夹中的一个简单的DLL工作得很好吗?

1 个解决方案

#1


8  

  1. Each package knows what other packages - and specifically what versions thereof - it depends on. That helps to make sure all libraries are compatible.
  2. 每个包都知道它依赖的其他包 - 特别是它的哪个版本。这有助于确保所有库都兼容。
  3. You still only should deploy that DLL version you actually need
  4. 您仍然应该部署您实际需要的DLL版本
  5. You can decide to not put any DLLs into your source control, because NuGet has a "Package Restore" feature that automatically loads missing packages on build.
  6. 您可以决定不将任何DLL放入源代码控制中,因为NuGet具有“包恢复”功能,可以在构建时自动加载缺少的包。
  7. You have a central place for all your dependencies: Just right-click on your project and choose the packages you need. No more searching for download links etc.
  8. 您拥有所有依赖项的中心位置:只需右键单击您的项目并选择所需的包。不再搜索下载链接等

#1


8  

  1. Each package knows what other packages - and specifically what versions thereof - it depends on. That helps to make sure all libraries are compatible.
  2. 每个包都知道它依赖的其他包 - 特别是它的哪个版本。这有助于确保所有库都兼容。
  3. You still only should deploy that DLL version you actually need
  4. 您仍然应该部署您实际需要的DLL版本
  5. You can decide to not put any DLLs into your source control, because NuGet has a "Package Restore" feature that automatically loads missing packages on build.
  6. 您可以决定不将任何DLL放入源代码控制中,因为NuGet具有“包恢复”功能,可以在构建时自动加载缺少的包。
  7. You have a central place for all your dependencies: Just right-click on your project and choose the packages you need. No more searching for download links etc.
  8. 您拥有所有依赖项的中心位置:只需右键单击您的项目并选择所需的包。不再搜索下载链接等