G
Guest
Hello!
I'm experiencing this exception while attempting to examine the public types
on my assembly DLL. Here is the code:
Dim objType As Type
Dim objDLL As Assembly
objDLL = System.Reflection.Assembly.LoadFrom(pathToDLL)
For each objType in objDLL.GetTypes <---- Exception is raised from GetTypes
.... stuff
Next
The same code executes without a problem from a windows forms application,
but not this Windows Service. When I examine the loaderexceptions property,
it contains 1 System.TypeLoadException that simply states "Could not load
type {myType} from Assembly {myAssembly}" etc. The Types array contains 1
RunTime type that contains a reference to a windows form that is a public
member of my Assembly - which is why I bring the question to you. Is there a
problem in general with loading windows forms types from an assembly while
running within a Windows Service, or is there just some sort of dependency
that isn't loading?
Thanks for any assistance!
Zach
I'm experiencing this exception while attempting to examine the public types
on my assembly DLL. Here is the code:
Dim objType As Type
Dim objDLL As Assembly
objDLL = System.Reflection.Assembly.LoadFrom(pathToDLL)
For each objType in objDLL.GetTypes <---- Exception is raised from GetTypes
.... stuff
Next
The same code executes without a problem from a windows forms application,
but not this Windows Service. When I examine the loaderexceptions property,
it contains 1 System.TypeLoadException that simply states "Could not load
type {myType} from Assembly {myAssembly}" etc. The Types array contains 1
RunTime type that contains a reference to a windows form that is a public
member of my Assembly - which is why I bring the question to you. Is there a
problem in general with loading windows forms types from an assembly while
running within a Windows Service, or is there just some sort of dependency
that isn't loading?
Thanks for any assistance!
Zach