I have a user in production who is getting a ReflectionTypeLoadException
while trying get the assembly types from an Outlook interop assembly. I need to code the application to better debug the problem but I cannot reproduce his issue so I have no way of testing the code to make sure it is giving me what I need.
I found this post: Error message 'Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.' which has sample code but I would like to debug through it to make sure it works for me and to see how it works.
Here is my code that throws. I have the actual assembly loaded. It is when I enumerate the types contained within that I get the exception:
Type t = assembly.GetTypes().Where(x => x.IsClass && x.Name.Equals("ApplicationClass")).FirstOrDefault();
Can anyone provide a sample or some insight into how I may simulate this problem so I can validate the code that I need to write?
Thanks.