Problem using managed C++ DLL in unmanged C++ project : Looking for XmlSerializers?

I have an unmanaged win32 C++ project and recently tried to add a new managed C++ DLL to the project. When I do and run in DEBUG mode I catch managed exceptions. However if I select "Continue" the program runs fine. ALso if I run in release these exceptions never get thrown, or atleast never bother the application at all.

Any one make any sense from these messages?

Messages that appear when I run my application:

LOG: Appbase = file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers/RssMonitorClient.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers/RssMonitorClient.XmlSerializers.EXE.

THEN

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'RssMonitorClient.XmlSerializers, Version=1.0.2455.11547, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

THEN:

Managed Debugging Assistant 'BindingFailure' has detected a problem in 'e:\Visual Studio 2005\Projects\VC_Inhouse\debug\VC_Inhouse.exe'.
Additional Information: The assembly with display name 'RssMonitorClient.XmlSerializers' failed to load in the 'Load' binding context of the AppDomain with ID 1. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'RssMonitorClient.XmlSerializers' or one of its dependencies. The system cannot find the file specified.
File name: 'RssMonitorClient.XmlSerializers'

=== Pre-bind state information ===
LOG: User = NA\oufo130
LOG: DisplayName = RssMonitorClient.XmlSerializers
(Partial)
LOG: Appbase = file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers/RssMonitorClient.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///e:/Visual Studio 2005/Projects/VC_Inhouse/debug/RssMonitorClient.XmlSerializers/RssMonitorClient.XmlSerializers.EXE.

Then

A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll

Additional information: Could not load file or assembly 'RssMonitorClient.XmlSerializers' or one of its dependencies. The system cannot find the file specified.

[4056 byte] By [JohnFly] at [2007-12-24]
# 1

Hello,

Did you check the dependencies of RssMonitorClient.XmlSerializers.DLL?
If it is a native dll, you can use DependencyWalker (http://www.dependencywalker.com/)
If it is a managed dll you can use Reflector (http://www.aisto.com/roeder/dotnet/)

Richard

Richard78 at 2007-10-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
Thats the most confusing issue, : There is noRssMonitorClient.XmlSerializers.DLL

The DLL I use is called RssMonitorClient.DLL and there is no referance to RssMonitorClient.XmlSerializers.DLL anywhere in any code.

JohnFly at 2007-10-8 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3

Hi,

The XmlSerializer probes for a dll called [YourAssemblyName].XmlSerializers.dll as part of its normal operation. Is the FileNotFoundException blocking your app or did you just see it in the debugger (ie, what happens when you Continue past it)? The expected behavior with the XmlSerializer in v2.0 is that you will get one or more FileNotFoundExceptions then it will run normally.

Please let me know if this resolves the issue.

Thanks

Alex

AlexDeJarnatt-MSFT at 2007-10-8 > top of Msdn Tech,Visual C++,Visual C++ General...