Error when DevForce looks for our IDataSourceKeyResolver implementation
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1989
Printed Date: 07-May-2025 at 2:23am
Topic: Error when DevForce looks for our IDataSourceKeyResolver implementation
Posted By: HunterMayer
Subject: Error when DevForce looks for our IDataSourceKeyResolver implementation
Date Posted: 21-Jul-2010 at 3:13pm
Do I have any options to control the probing behavior when DevForce looks for our IDataSourceKeyResolver implementation?
When constructing an EntityManager (we don't maintain an app config so we implemented IDataSourceKeyResolver). I encounter a file load exception looking for a DLL referenced by 3rd party COTS I purposely don't include (The library is not needed/used and causes another error to occur in a different 3rd party COTS product (having to do with access permissions)).
Everything works as expected (isolated in a separate project) until I include that project with the rest of our application. Then when I create my EntityManager, every library not already loaded gets loaded, and I get the exception because of the missing DLL that we don't include.
I had the same issue with an about box implementation that showed all of the libraries present and their version. We however skip over direct and indirectly referenced libraries that can not be found because we expected some references to not be present. Is there a way to enable similar probing behavior when DevForce is looking for our custom data source key resolver implementation? Or can I register it manually as to avoid the probing all together?
In the immediate to get around this we have removed our entire mapping components completely to work through an upcoming beta release... It's a huge hit, but making the maps run in their own AppDomain to get around the CAS (security access) violation error is a bridge to far in the given time frame (which is about 1.5 weeks from this posting). I'd love to add it back in as is.
If you need a solution to demonstrate this failure I bet I can whip something up quick like for you. Just tell me where to send it.
|
Replies:
Posted By: ting
Date Posted: 21-Jul-2010 at 5:33pm
Yes, take a look at the CompositionHost methods. The code will look something like this:
using IdeaBlade.Core.Composition; CompositionHost.SearchPatterns.Clear(); CompositionHost.SearchPatterns.Add("DomainModel.dll"); // Add whatever assemblies you need probed
|
|