.net - 如何将 Enterprise Library 升级到最新版本?

标签 .net visual-studio-2010 enterprise-library

我目前在我的几个应用程序中使用 Enterprise Library 的异常日志记录功能。

不久前,我在我的机器上安装了 Enterprise Library,以便我可以从我的 Visual Studio 工具栏启动配置实用程序。一切都很好,直到我的最新项目。

几周前,我使用 NuGet 将我需要的企业库库下载到我的项目中。它提取的库是 5.0.505.0 版。我在我的机器上安装的企业库是 5.0.414.0。我最初在项目中配置了所有内容,并且配置文件中的所有引用都设置为 .414。自然,它不会运行,所以我将它们全部更改为 0.505,然后一切都运行了。现在的问题是我需要做一些更改,编辑器因为版本冲突而无法运行。

所以,我检查了 MSDN我试图下载这个 update ,但更新不会运行,说明安装了旧版本的 Enterprise Library。

我考虑过卸载然后重新安装最新的企业库,这可能会奏效。但是,我想检查是否有人知道更集成的升级方法?

有没有什么方法可以在不卸载和重新安装的情况下升级企业库?

最佳答案

来自 Optional Update 1关联:

When upgrading from Enterprise Library 5.0, you have two options:

  1. Uninstall Enterprise Library 5.0 and then execute a clean installation.

  2. Upgrade Enterprise Library 5.0 to Optional Update 1 from the command prompt by: (a)renaming the Enterprise Library 5.0 Optional Update 1.msi file to Enterprise Library 5.0.msi and (b) executing the following command from the command prompt:

msiexec /i "Enterprise Library 5.0.msi" REINSTALLMODE=vomus REINSTALL=ALL



如果要“保留”版本 5.0.414.0,请备份 C:\Program Files (x86)\Microsoft Enterprise Library 5.0\Bin 目录,您可以随时从备份目录中引用 414 程序集并通过设置运行配置工具设置一个配置集。见 Avoiding configuration pitfalls with incompatible copies of Enterprise Library对于应该仍然相关的旧文章(具有适当的版本更改)。

此外,如果您从 Optional Update 1 download 安装 Microsoft.Practices.EnterpriseLibrary.ConfigConsole.vsix或 EnterpriseLibrary.config在 NuGet 上,它将添加一个上下文敏感的配置工具,允许您在每个解决方案的基础上设置二进制文件路径(并避免像以前的方法那样修改注册表)。如果您备份了 414 二进制文件,这将允许您在一个针对 414 的解决方案和针对 505 的另一个解决方案中运行配置工具。

关于.net - 如何将 Enterprise Library 升级到最新版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10095139/

相关文章:

.net - WPF 翻译转换

c# - 64 位 .NET 应用程序中的 32 位 ActiveX 控件

c# - 汉诺塔 : Moving Rings from Peg to Peg

c# - Visual Studio 数据库单元测试 - 校验和

c# - 框架约定的静态检查

wcf 生成的类和验证应用程序 block 属性

c# - 企业库日志记录 block 不记录

.net - 使用空参数调用函数的术语

c - 指向字符的指针

asp.net - T-Sql 错误处理和日志记录