1

我有一个 Windows 窗体应用程序,当我将它安装在我的本地计算机上时,它给出了以下错误:-

Microsoft.Practices.ServiceLocation.ActivationException:尝试获取 LogWriter 类型的实例时发生激活错误,键“”---> Microsoft.Practices.Unity.ResolutionFailedException:依赖项解析失败,类型 =“Microsoft.Practices.EnterpriseLibrary。 Logging.LogWriter", name = "(none)"。异常发生时:解决时。异常是: InvalidOperationException - 无法构造类型 LogWriter。您必须配置容器以提供此值。

4

1 回答 1

1

Have you included the EnterpriseLibraryCoreExtension in your Unity configuration, either via XML or by code? That's the piece that knows how to read the Entlib logging configuration and turn it into container registrations.

于 2012-12-21T03:09:19.777 回答