Analyze 64-bit DLL from within T4 template in Visual Studio (32-bit) using Reflection
I would like to analyse a DLL from within a T4 template using Reflection, so that I can generate code based on the results of the reflection analysis. I know EnvDTE would be a better option, but this is not possible in my case for several reasons. The problem with reflection is that the DLL is a 64-bit DLL and if I load that within the T4 template I get a BadImageFormatException because I am trying to load a 64-bit DLL into a 32-bit process (Visual Studio 2012). Is there any way to analyse the contents of that DLL within T4, preferrably using reflection? I have already thought about writing a