开发者

Microsoft.Practices.ObjectBuilder2.dll not found after installing Enterprise Lib 5.0

开发者 https://www.devze.com 2023-03-12 02:00 出处:网络
I have re开发者_高级运维cently installed Enterprise library 5.0 but I am unable to find \"Microsoft.Practices.ObjectBuilder2.dll\". I am working onCALTutorial where I will need this dll as reference.

I have re开发者_高级运维cently installed Enterprise library 5.0 but I am unable to find "Microsoft.Practices.ObjectBuilder2.dll". I am working on CALTutorial where I will need this dll as reference.

Can anybody answer this?

Thanks, Omky


There is breaking change in EntLib 5. The library help file mentioned about this which says that code for "Microsoft.Practices.ObjectBuilder2.dll" is included in Unity assembly hence no need of separate reference.


In case anyone else has a similar issue, I am responsible for a project that uses the NetTiers templates to generate data/service layers. The templates were configured to use EntLib 4.1 and I updated them to use EntLib 5. For the most part this was successful but NetTiers defines a class EntityLocator that is derived from ObjectBuilder2.Locator. Unfortunately the Locator class was removed from ObjectBuilder in the EntLib 5 release of Unity.

To address this, and due to Locator being referenced in the NetTiers templates, the easiest solution for me was to download the Unity 1.2 source code which contains source for the Locator class. I extracted the Locator class into my own solution, and after adding a couple of minor dependencies (Guard.cs, and the Properties folder), fixing up some namespaces, and updating the templates, I was able to successfully generate the data/service layers for my project.


There was same error. My unity version was 2.1.505.2

First downgrade Install-Package Unity -Version 2.1.505

and then upgrade Install-Package Unity -Version 2.1.505.2

It worked for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号