How to solve Error "The name 'EnterpriseLibraryContainer' does not exist in the current context"

Topics: Enterprise Library Core, Exception Handling Application Block
Oct 16, 2012 at 2:45 PM

Hi All,

We are completely new to enterprise library.

We install Microsoft Enterprise libarary 5.0 with Visual studio 2010

we add all the 3 dlls.

If i create the object

private LogWriter writer = EnterpriseLibraryContainer.Current.GetInstance<LogWriter()>;

it shows the error

The name EnterpriseLibraryContainer doesnot exist in the current context

 

Thanks in Advance,

Bell,

 

 



Oct 16, 2012 at 3:01 PM

To use the Enterprise Library container you will need a reference to Microsoft.Practices.EnterpriseLibrary.Common.dll and then a using statement for Microsoft.Practices.EnterpriseLibrary.Common.

The Hands-On Labs for Microsoft Enterprise Library 5.0 is a great resource for getting started.

--
Randy Levy
Enterprise Library support engineer
entlib.support@live.com