nuget - 防止 nuget 包修改

标签 nuget

有时,包喜欢修改我的 web.config,添加我并不真正需要的引用,或者实现诸如 WebActivator 之类的东西并 Hook 我的 Application_Start (我实际上在其中以其他方式处理这个问题,比如使用 IoC 容器。

如何防止这种行为?

最佳答案

NuGet 包管理器并不真正支持这种情况,但一种方法是使用 nuget.exe。

通过 nuget.exe 进行包安装只需将文件提取到某个位置。它不会修改项目文件或引用。缺点是您必须手动添加通常需要的引用、内容和其他配置更改。

关于nuget - 防止 nuget 包修改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11798803/

相关文章:

localhost - 通过 localhost 在本地托管 Nuget Gallery,无法从 Visual Studio 库包管理器访问其提要 - 返回 404 Not Found

Azure KeyVault nuget 包问题

.net - 在 NuGet 上找不到最新版本的包

nuget - 如何在未安装 Visual Studio 的情况下更新 Nuget 包管理器?

continuous-integration - 使用 TeamCity 合并语义版本控制的最佳实践是什么

visual-studio - 如何在项目的预构建事件中解析Nuget包版本和路径?

.net - 从 powershell 脚本引用 .Net .dll

c# - Xamarin.Auth Android 项目导致 CustomTabs 出现 "Cannot find symbol"错误?

c# - 如何为 .net 3.5 安装 Automapper

xml - 在PowerShell中使用msbuild在NuGet中的安装事件上编辑csproj