New Posts New Posts RSS Feed: Error when DevForce looks for our IDataSourceKeyResolver implementation
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Error when DevForce looks for our IDataSourceKeyResolver implementation

 Post Reply Post Reply
Author
HunterMayer View Drop Down
Newbie
Newbie
Avatar

Joined: 10-Jun-2010
Location: Beaverton OR
Posts: 11
Post Options Post Options   Quote HunterMayer Quote  Post ReplyReply Direct Link To This Post Topic: Error when DevForce looks for our IDataSourceKeyResolver implementation
    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.
Back to Top
ting View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 27-Mar-2009
Location: San Francisco
Posts: 427
Post Options Post Options   Quote ting Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down