- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想在我的C#项目中引用Powershll5.0
中的system.management.automation.dll
,手动添加引用和通过Nuget添加有什么区别包裹?
我如何保证运行我的应用程序的机器在引用路径中有这个程序集?即使我在我的应用程序安装程序中包含这个 dll,这个 dll 不在引用路径中,机器可以自动定位这个 dll 吗?
最佳答案
What is the difference of adding reference directly and adding package by Nuget
NuGet本质上和手动添加引用没有什么区别,最终都是为项目添加引用。它是一个自动为我们添加程序集并进行管理的工具,有效的提高了我们开发项目的效率。
更多的细节,你可以查看关于nuget的文档:
Put simply, a NuGet package is a single ZIP file with the .nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number. Developers with a code to share create packages and publish them to a public or private host. Package consumers obtain those packages from suitable hosts, add them to their projects, and then call a package's functionality in their project code. NuGet itself then handles all of the intermediate details.
Because NuGet supports private hosts alongside the public nuget.org host, you can use NuGet packages to share code that's exclusive to an organization or a workgroup. You can also use NuGet packages as a convenient way to factor your own code for use in nothing but your own projects. In short, a NuGet package is a shareable unit of code, but does not require nor imply any particular means of sharing.
Is it just that .nupkg can contain a whole bunch of other things aside from a .dll (e.g. documentation)?
是的,NuGet 包可以在包中包含指定文件。
Why would I use one or the other?
Nuget 提供了几个额外的好处:
希望对您有所帮助。
关于c# - 直接添加引用和通过Nuget添加包有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55700750/
我已经在Visual Studio中创建了新的解决方案,启用了nuget包还原,并进入了解决方案根.nuget文件夹,该文件夹包含使包还原正常工作所需的以下文件:NuGet.exe,NuGet.con
自 Nuget 1.5 以来,我的团队一直在使用“启用包还原”选项,以使包不受我们的源代码控制。当 Nuget 1.6 发布时,我们注意到一个问题,即它没有拉取软件包,并跟踪它到 .nuget 文件夹
我维护了一些小的 Nuget 包。 我在 git 存储库中有一个 Nuget README 文件,.nupkg 文件由 VS 根据“Package”配置自动构建,存储在 .csproj 文件。 每当我
我们是一个小型开发团队,我们希望开始使用我们的库作为 NuGet 包。现在我已经看到我们可以创建 NuGet 提要或 NuGet 服务器或 NuGet 画廊。 现在我们不确定有什么区别,对于我们的小团
我正在编写一个脚本,它将自动打包 Nuget 文件并将其发布到我的私有(private)存储库(文件共享)和私有(private)符号服务器(在 localhost 上)。 当我运行 nuget pa
我有一个解决方案,我想从两个项目中创建一个 NuGet 包。 如果它只是一个项目,我会使用 .csproj 文件来规范 NuGet 打包器,但由于我希望两个不同的项目进入完成的包,我不能这样做。 我创
我正在做一个需要处理 Excel 文件的项目。我为这项工作找到了一个名为 Aspose.cells 的库。它不是一个免费的图书馆,我们应该从它的网站购买它的许可证,以便在我们的项目中使用它。但是,我发
我已经使用 Nuget 安装程序创建了一个 TeamCity 构建步骤,但是当我运行这些步骤时出现错误: Updating sources: server side checkout [15:35:4
是否有任何指南或建议来管理不在 nuget 上的库以及在 nuget 上的包。 其中大多数可能是 3rd 方库,除非我们专门安装它们,否则它们可能永远不会继续使用 nuget。 最好将这些 dll 放
我一直在研究自托管 NuGet,但很难理解如何设置它以及它如何帮助支持我们的开发过程。 有没有人对使用哪个,如何设置有任何建议? 或者我应该只使用托管服务? 最佳答案 在查看了各种解决方案(自托管和托
我正在为 OSGeo.FDO 创建 nuget 包,但我遇到了以下问题。 FDO 使用 providers.xml列出它可以使用的所有提供程序的文件。所以我创建了一个名为 OSGeo.FDO 的主包包
我想知道 NuGet 的含义是什么。它是像blah blah get这样的东西吗?它甚至有一个有意义的名字吗?或者它是某物的缩写还是有人为了好玩而决定这个名字?请帮忙,这个问题已经困扰了我 1 周。
This question already has answers here: Is it possible to change the location of packages for NuGet?
如何在 Visual Studio 之外下载 NuGet 包?所以它可以用来创建离线包。 最佳答案 如何在没有 Visual Studio 或 Nuget 包管理器的情况下下载 NuGet 包: 在
我似乎在网络上找不到任何对此表示赞同或反对的地方。谁能指出我的答案吗?或者更好的是,如果您从事 NuGet 工作,您能否给出一些指示,说明是否有任何计划允许商业库包(我认为需要某种身份验证)包含在未来
我已经打开了 TeamCity 的 NuGet 服务器,我想推送公共(public)包(即来自 NuGet.org 等公共(public)资源),因为构建服务器无法看到我们公司外部的信息,因此从 Nu
在我的工作团队中,我们依赖两个 NuGet 提要:来自 NuGet.org 的官方提要用于公共(public)包,而我们文件服务器上的文件夹用于内部包。 这对我们来说效果很好,但我认为我们有一个潜在的
我在我工作的 Web 服务器(在 IIS 7.0 下)上设置了新的 NuGet Gallery。该网站本身已设置并运行良好。我们能够注册帐户、确认电子邮件地址,甚至通过网站本身上传新包。 我们的自动构
当我们在 Visual Studio 2017 中创建 nuget 包时,它默认将项目引用添加为另一个 nuget 引用。 我们如何在创建包时禁用它,而是: 选择不同的包名 在创建包时包含项目的 dl
我可以执行类似 - mono --runtime=v4.0.30319 /Library/TeamCity/buildAgent/work/b0d2d3fefe88d393/.nuget/NuGet.
我是一名优秀的程序员,十分优秀!