Okay,
So there are moments where reflection is awesome. Other times, like this, it can be a royal pain.
I have a system in place which allows the user to select an assembly and load it for evaluation of exported types within.
However, once loaded into the current process space, regardless of the purpose, it stays there. So in this case, the system loading the assembly is an ItemTemplate for Visual Studio. That means, that once loaded, visual studio tends to hand on to it, for some annoying reason, regardless if my template wizard is still in memory.
I'd like to know if there is a way, to Load up an assembly, get the type information from it, use that type information for code generation purposes, and then UNLOAD the assembly, so that VS or any other editor is not still referencing it.
Thanks
Jaeden "Sifo Dyas" al'Raec Ruiner
PS - I'm currently using Assmbly.LoadFile(), there are other avenues, but not sure which will serve my purposes of only having the assembly loaded into the 3rd party application (so to speak) for duration of that application being in memory. ReflectionOnlyLoad(), load from a byte array, whatever.
"Never Trust a computer. Your brain is smarter than any micro-chip."
PS - Don't mark answers on other people's questions. There are such things as Vacations and Holidays which may reduce timely activity, and until the person asking the question can test your answer, it is not correct just because you think it is. Marking it
correct for them often stops other people from even reading the question and possibly providing the real "correct" answer.