locked
Error activation LogWriter RRS feed

  • Question

  • User-1213262409 posted

    Hi,
    in VS 2008 I'm trying to run a simple WinForm application that make a sum of 2 numbers.
    I've referenced the .dll of Enterprise Library 5 in the project:

    Microsoft.Practices.EnterpriseLibrary.Common.dll
    Microsoft.Practices.EnterpriseLibrary.Logging.dll
    Microsoft.Practices.ServiceLocation.dll
    Microsoft.Practices.Unity.dll
    Microsoft.Practices.Unity.Interception.dll

    and I've write code like this:

    private void btnSum_Click(object sender, EventArgs e)
    {
         LogWriter DefaultWriter = EnterpriseLibraryContainer.Current.GetInstance<LogWriter>();
         if (DefaultWriter.IsLoggingEnabled())
         {
               DefaultWriter.Write("Begin Sum Method");
         }


    and it compiles.

    But when I run the program, I get this error:

    {"Activation error occured while trying to get instance of type LogWriter, key \"\""}

    Where I'm wrong?

    Thanks in advance.

    Luigi

    Friday, April 8, 2011 3:48 AM

Answers

  • User220959680 posted

    Dedicated forums for Enterprise library application blocks

    

    http://entlib.codeplex.com/discussions
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, April 11, 2011 4:51 AM

All replies