I was getting InvalidCastException when referencing a type created from AppDomain.CreateInstanceFrom

Thanks Rob!

Rob had the answer for me in an April post at
http://blogs.msdn.com/robgruen/archive/2005/04/05/405763.aspx

The funny part about my situation was that it was working fine, but I read all dlls in a directory, so when I changed my source directory to one containing dlls already loaded in my AppDomain… ka-boom- this issue got in my way.

It is all good now. It makes sense, there is no need to load the same assembly into a single appdomain more than once.

Plugin System nearly complete. Now if I could just get log4net to work in that second appdomain 🙁