Enterprise Library - Class Library Greif.

Discussion in 'ASP .Net' started by =?Utf-8?B?QUo=?=, Oct 26, 2007.

  1. Hi,

    I have created a custom membership provider for an ASP.NET web app which
    depends of the Enterprise Library (Data, Exception) handling blocks. This
    code currently runs from the App_Code folder fine. I now want to separate
    this code into its own class library.

    I have created the separate class library, and added the necessary references.
    However, i noticed the Common & Object Builder DLL's don't get added
    automatically like they do in a web app.
    So i have been forced to add them manually. In the case of the common.dll it
    doesn't even show up in the .NET tab
    in the references dialog, so i have had to browse the the directory
    containing the src files.

    Anyway after doing this, i still get and error when i try and build my class
    library :

    The type
    'Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.IInstrumentationEventProvider'
    is defined in an assembly that is not referenced. You must add a reference to
    assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

    Can anyone please help?

    Cheers,
    Adam
     
    =?Utf-8?B?QUo=?=, Oct 26, 2007
    #1
    1. Advertising

  2. Problem solved!

    Cheers,
    Adam

    "AJ" wrote:

    > Hi,
    >
    > I have created a custom membership provider for an ASP.NET web app which
    > depends of the Enterprise Library (Data, Exception) handling blocks. This
    > code currently runs from the App_Code folder fine. I now want to separate
    > this code into its own class library.
    >
    > I have created the separate class library, and added the necessary references.
    > However, i noticed the Common & Object Builder DLL's don't get added
    > automatically like they do in a web app.
    > So i have been forced to add them manually. In the case of the common.dll it
    > doesn't even show up in the .NET tab
    > in the references dialog, so i have had to browse the the directory
    > containing the src files.
    >
    > Anyway after doing this, i still get and error when i try and build my class
    > library :
    >
    > The type
    > 'Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.IInstrumentationEventProvider'
    > is defined in an assembly that is not referenced. You must add a reference to
    > assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0,
    > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
    >
    > Can anyone please help?
    >
    > Cheers,
    > Adam
     
    =?Utf-8?B?QUo=?=, Oct 26, 2007
    #2
    1. Advertising

  3. "AJ" wrote:

    > Problem solved!
    >
    > Cheers,
    > Adam
    >
    > "AJ" wrote:
    >
    > > Hi,
    > >
    > > I have created a custom membership provider for an ASP.NET web app which
    > > depends of the Enterprise Library (Data, Exception) handling blocks. This
    > > code currently runs from the App_Code folder fine. I now want to separate
    > > this code into its own class library.
    > >
    > > I have created the separate class library, and added the necessary references.
    > > However, i noticed the Common & Object Builder DLL's don't get added
    > > automatically like they do in a web app.
    > > So i have been forced to add them manually. In the case of the common.dll it
    > > doesn't even show up in the .NET tab
    > > in the references dialog, so i have had to browse the the directory
    > > containing the src files.
    > >
    > > Anyway after doing this, i still get and error when i try and build my class
    > > library :
    > >
    > > The type
    > > 'Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.IInstrumentationEventProvider'
    > > is defined in an assembly that is not referenced. You must add a reference to
    > > assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0,
    > > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
    > >
    > > Can anyone please help?
    > >
    > > Cheers,
    > > Adam
     
    =?Utf-8?B?TmVpbA==?=, Oct 29, 2007
    #3
  4. How did you fix this Adam?

    "AJ" wrote:

    > Problem solved!
    >
    > Cheers,
    > Adam
    >
    > "AJ" wrote:
    >
    > > Hi,
    > >
    > > I have created a custom membership provider for an ASP.NET web app which
    > > depends of the Enterprise Library (Data, Exception) handling blocks. This
    > > code currently runs from the App_Code folder fine. I now want to separate
    > > this code into its own class library.
    > >
    > > I have created the separate class library, and added the necessary references.
    > > However, i noticed the Common & Object Builder DLL's don't get added
    > > automatically like they do in a web app.
    > > So i have been forced to add them manually. In the case of the common.dll it
    > > doesn't even show up in the .NET tab
    > > in the references dialog, so i have had to browse the the directory
    > > containing the src files.
    > >
    > > Anyway after doing this, i still get and error when i try and build my class
    > > library :
    > >
    > > The type
    > > 'Microsoft.Practices.EnterpriseLibrary.Common.Instrumentation.IInstrumentationEventProvider'
    > > is defined in an assembly that is not referenced. You must add a reference to
    > > assembly 'Microsoft.Practices.EnterpriseLibrary.Common, Version=3.1.0.0,
    > > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
    > >
    > > Can anyone please help?
    > >
    > > Cheers,
    > > Adam
     
    =?Utf-8?B?TmVpbA==?=, Oct 29, 2007
    #4
  5. =?Utf-8?B?QUo=?=

    Guest

    Hi , can you please explain how you solved the problem ?

    I got the same.

    TIA
     
    , Oct 31, 2007
    #5
  6. I managed to fix this.
    It appeared that I had older versions of the "Common.dll" being referenced.

    Once I completely removed the DLL, copied over the 3.1.0 version to my
    centralised DLL folder and re-referenced this DLL in my projects, the error
    was gone.





    "" wrote:

    > Hi , can you please explain how you solved the problem ?
    >
    > I got the same.
    >
    > TIA
    >
    >
     
    =?Utf-8?B?TmVpbA==?=, Oct 31, 2007
    #6
  7. Add the "Enterprise Library Shared Library" reference. This will effectively
    add Microsoft.Practices.EnterpriseLibrary.Common to your reference list.
     
    =?Utf-8?B?RGVycmljayBSaWJpbGxh?=, Nov 17, 2007
    #7
  8. =?Utf-8?B?QUo=?=

    Namret Guest

    Thx!!!

    "Derrick Ribilla" wrote:

    > Add the "Enterprise Library Shared Library" reference. This will effectively
    > add Microsoft.Practices.EnterpriseLibrary.Common to your reference list.
     
    Namret, Dec 6, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QWhzYW4=?=
    Replies:
    0
    Views:
    1,369
    =?Utf-8?B?QWhzYW4=?=
    Mar 31, 2005
  2. Replies:
    3
    Views:
    572
  3. Replies:
    3
    Views:
    407
    Tom Dyess
    Jan 20, 2005
  4. E11
    Replies:
    1
    Views:
    4,897
    Thomas Weidenfeller
    Oct 12, 2005
  5. Replies:
    2
    Views:
    596
    Tom Dyess
    Jan 20, 2005
Loading...

Share This Page