Dll Reference related issue

Topics: Exception Handling Application Block
Oct 7, 2009 at 6:23 AM
Edited Oct 7, 2009 at 6:25 AM
Hi,
I am  working on a framework api library .
This library project  internally references Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll for creating ExceptionHandlers.
Now when ever i am referencing the api library dll in any test project ,the test project ask for specific reference to  Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll but which i don't want to do because client don't need to know which internal dll's we are using.
If any body faced this issue please guide me.
Thanks in advance

Pradeep
Oct 7, 2009 at 9:12 AM
Edited Oct 7, 2009 at 9:13 AM

Hi,

Is that a run time or compile error? I tried creating the same scenario, where i have a class library which has a reference to a ent lib assembly, when i referenced the class library from the hosting app and run it. seems to be working fine as expected. Is my repro steps correct? Can you provide your own repro steps?

Valiant Dudan
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com

Oct 7, 2009 at 10:16 AM

Hi Dudan,

I am having a library  project say Proj1 which have references to

Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll

Microsoft.Practices.EnterpriseLibrary.Common.dll

MyCompany.ExceptionHandlingFramework.dll -which internally uses Microsoft.Practices.EnterpriseLibrary.ExceptionHandling

now i am defining a Exception handler in Proj1 something like as follows

[ConfigurationElementType(typeof(Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.CustomHandlerData))]
    public class SESExceptionHandler : QExceptionHandler //QExceptionHandler is an abstract class which defined in MyCompany.ExceptionHandlingFramework
    {//Specific exception handler implementation goes here}

 

Now i am referring Proj1 in a test project but now the test project throws compile time error saying we need to refer both

Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll,MyCompany.ExceptionHandlingFramework.dll

Thanks

Pradeep

Oct 8, 2009 at 2:47 AM

I believe this is how vs works and not an entlib issue, refer to this thread -http://stackoverflow.com/questions/738349/why-must-i-chain-reference-assemblies.

 

Sarah Urmeneta
Global Technology and Solutions
Avanade, Inc.
entlib.support@avanade.com