Print Page | Close Window

How can I excluded exe and dll files from being probed?

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=2111
Printed Date: 18-Oct-2025 at 7:59am


Topic: How can I excluded exe and dll files from being probed?
Posted By: BrooksAdair
Subject: How can I excluded exe and dll files from being probed?
Date Posted: 31-Aug-2010 at 2:49pm
I am using DevForce EF in some .NET assemblies that are being called from a legacy COM application. The problem I am having is that DevForce probes all the DLLs and EXEs in the applications directory. Any time it hits a non .NET file I get the following exception: "System.BadImageFormatException was unhandled by user code"

I can move all the DLL files to another directory, but the main EXE I can not move. Is there a way to handle the exception that allows the DevForce initialization code to still run? Or is there a way to exclude some EXEs from the probing?



Replies:
Posted By: ting
Date Posted: 31-Aug-2010 at 7:44pm
This should be fixed in the 6.0.5 release this week.  However, it's not a bad idea to specify the probe assemblies to speed up application startup.  You do this by calling the CompositionHost:
 
using IdeaBlade.Core.Composition;
 
CompositionHost.SearchPatterns.Clear();
CompositionHost.SearchPatterns.Add("DomainModel.dll");  //  Add whatever assemblies you need probed
 



Print Page | Close Window