使用Enterprise LIbrary 6应用程序块

时间:2013-05-07 17:38:23

标签: enterprise-library

然后新的Enterprise Library 6出来了,可以是downloaded here。我已将EnterpriseLibrary6-binaries.exe下载并解压缩到我的C:驱动器上的文件夹中。自述文件说:

MICROSOFT ENTERPRISE LIBRARY 6

Summary: This package contains Enterprise Library configuration console, MSMQ distributor service, merge configuration tool and a script to download binaries for all application blocks from NuGet.

In order to get all the binaries, run the install-packages.ps1 script.

Note: For the Semantic Logging Application Block Out-of-Process service, a separate package is available for download.

然后我运行Powershell并运行脚本。我现在查看我提取.exe文件夹,所有二进制文件都在那里。现在,这是Enterprise Library 6 .chm。

中的说明
To install the integrated Visual Studio configuration editor 

1. On the Visual Studio Tools menu, choose Extensions and Updates. 
2. In the Extensions and Updates dialog, search online for EnterpriseLibrary.config. 
3. Click the Download button to download and install the Enterprise Library configuration editor. 
4. Restart Visual Studio to complete the installation. 


To launch and use the configuration editor from Visual Studio 

1. Open a solution in Visual Studio. 
2. If the solution does not contain a configuration file, add one using the Visual Studio Add menu. 
3. In Solution Explorer, right-click the configuration file and then click Edit Enterprise Library V6 Configuration. This launches the integrated configuration editor or the appropriate standalone version of the configuration tool. 

步骤#3是我被卡住的地方。我有一个带有web.config的WCF服务项目。我右键单击web.config,但没有看到“编辑企业库V6配置”上下文菜单选项。

我看到“编辑服务器配置文件v6”。但是,当我单击此按钮时出现以下错误。

enter image description here

我要做的就是在我的WCF服务项目中使用异常处理应用程序块。我环顾网络,找不到任何简单的分步教程来指导我。非常感谢任何帮助。

4 个答案:

答案 0 :(得分:4)

您需要将“Enterprise Library v6二进制文件路径”的解决方案属性设置为 您解压缩“EnterpriseLibrary6-binaries.exe”的文件夹。

您可以通过单击解决方案,然后按F4查看属性窗口来执行此操作,但您需要确保“Enterprise Library Config tool”是v6。 http://www.microsoft.com/en-us/download/details.aspx?id=38789

Visual Studio库提供了Enterprise Library 5 Config工具,这显然是错误的版本。

答案 1 :(得分:3)

我不得不使用NuGet来安装我想在项目中使用的应用程序块。对我来说,工具>>库包管理器>>管理NuGet包以获得解决方案并添加适当的EntLib 6异常处理应用程序块WCF提供程序。

答案 2 :(得分:0)

只需下载Microsoft.Practices.EnterpriseLibrary.ConfigConsoleV6.vsix即可 从下面的链接和安装时提供VS2012或Vs2013  http://www.microsoft.com/en-us/download/details.aspx?id=38789

安装后重启Visual Studio。 您将在Enterprise Library 6.0中进行配置。 默认情况下,VS中的扩展和更新提供5.0配置,我们需要6.0才能工作。

答案 3 :(得分:0)

这对我有用:

here下载Microsoft.Practices.EnterpriseLibrary.ConfigConsoleV6.vsix,在安装过程中,提供VS2012或VS2013。

然后重启你的VS2012 / 2013,你应该好好去!