VS2005 Whidbey Beta 1 FileLoadException when loading assembly

D

Daniel Mori

Im at a loss on where to proceed next. I wonder if anyone can help
me.

I have a managed C++ DLL is basically a thin wrapper around several
unmanaged classes. This DLL builds fine.

In my main C# application I have setup a project reference to this
DLL.
Im able to reference these managed .DLL classes from within my code
without problem.

However, the application runs fine up until the point where I first
access the the DLL, I get a FileLoadException.

The only useful information that this exception provides me, is the
following:

"Error while loading file 'RTAudio, Version=1.0.1724.42384,
Culture=neutral, PublicKeyToken=null'. For more details, check for an
inner exception."

Data: System.Collections.ListDictionaryInternal
InnerExeception: "One or more arguments are invalid"

From what I can tell. The Fuslogvw.exe log indicates a good load:

------------------------------------------------------------------------
*** Assembly Binder Log Entry (21/09/2004 @ 22:31:19) ***

The operation was successful.
Bind result: hr = 0x0. The operation completed successfully.

Assembly manager loaded from:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\mscorwks.dll
Running under executable
c:\Sequencer\RTAudioTest\bin\Debug\RTAudioTest.vshost.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: User = TRINITY\Dan
LOG: DisplayName = RTAudioTest, Version=1.0.1725.38566,
Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///c:/Sequencer/RTAudioTest/bin/Debug/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = RTAudioTest.vshost.exe
Calling assembly : vshostutil, Version=8.0.1200.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a.
===
LOG: This bind is in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.40607\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:///c:/Sequencer/RTAudioTest/bin/Debug/RTAudioTest.dll.
LOG: Attempting download of new URL
file:///c:/Sequencer/RTAudioTest/bin/Debug/RTAudioTest/RTAudioTest.dll.
LOG: Attempting download of new URL
file:///c:/Sequencer/RTAudioTest/bin/Debug/RTAudioTest.exe.
LOG: Assembly download was successful. Attempting setup of file:
c:\Sequencer\RTAudioTest\bin\Debug\RTAudioTest.exe
LOG: Entering run-from-source setup phase.
LOG: Binding succeeds. Returns assembly from
c:\Sequencer\RTAudioTest\bin\Debug\RTAudioTest.exe.
-------------------------------------------------------------------------

Any help would be much appreciated.

Regards,
Daniel Mori
 
D

Daniel Mori

Thankyou for your response.
I've posted this message on the whidbey newsgroups that you suggested.

I posted the problem here, as I cannot confirm if this is a whidbey
specific problem, General .net problem, or plain old user error.

however, my changes of a response has just doubled. So thankyou.
 
D

Daniel Mori

I managed to solve my problem.

I needed to set my mixed C++ DLL to a 'Resource only DLL'..../NoEntry.

However, after this, I got an Assertion in dbgheap.c...."pUserData != null".

I fixed this by using /include "__DllMainCRTStartup@12"

Works fine now
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top