Dynamically loading Managed DLL Plugins at Run-Time with Symbols

J

Jon Brunson

I've posted this before, way back in October, but since then I've not
resolved the issue, and was hoping someone now reading the Newsgroup
might be able to help.

I'm loading some DLL plugins into my app on a Mobile Device, it all
works fine, and the plugins work perfectly, except for the fact I cannot
debug them, which, as you an imagine, is very annoying.

This is the code I use to load the plugins:

[VB.NET]
Public Shared Sub Load(ByVal Filename As String)
Dim ObjType() As Type = Nothing

' load the dll.
Dim asm As [Assembly] = Nothing
asm = [Assembly].LoadFrom(Filename)
If Not asm Is Nothing Then
' create an array of types
ObjType = asm.GetTypes()
End If
..
..
..
I then loop though the types and load those that match my interface.

When the line asm = [Assembly].LoadFrom(Filename) is executed, I get the
following line in the Output window:

'<MyApp>.exe': Loaded 'C:\VSS Working
Folder\SmartDevice\Builds\Debug\<MyDLL>.dll', No symbols loaded.

After this line I've got a break point set, and at this point view the
Modules window. My Plugin DLL is loaded, like so:

Name: <MyDLL>.dll
Address: 4C400000-4C403200
Path: C:\VSS Working Folder\SmartDevice\Builds\Debug\<MyDLL>.dll
Order: 14
Version: <blank>
Program: [3144] rundll32.exe: <MyApp>.exe
Timestamp: <Is visibly blank, but "Copy" gave me '01/01/1601 01:00'>
Information: No symbols loaded.

If I right-click on the Module, and select "Reload Symbols", navigate to
where the pdb file is for My Plugin DLL, and load it, it still reads "No
symbols loaded"


(Thanks for sticking with me so far :blush:))


My theroy is that because the version is blank, it's looking at hte pdb
and saying "This pdb is for version 1.2.3 (or whatever), and you're
asking me to load it for version <blank>, that's not allowed so I;m not
going to load it". I don't know if that is infact the case, or what, but
it seems reasonable to me.


So I'm asking for help. Either on getting the Plugin DLL to load with
it's version number, or on how to force VS.NET to load the pdb without
checking any constraints.

Thanks in advance
 
J

John Roberts

I'm successfully able to debug plug-ins (well, applets) in my application so
I know it is possible. It must be extremely frustrating if you can't do it.
I use C# rather than VB but have not run into any problems. The only
requirement is that the plug-in DLL is referenced in the 'Reference' folder
of the client application during debugging - I take it yours is?

- John
 

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

Top