I have a following structure
App_Code
MyClass.cs [Company.MyNameSpace.MyClass]
Bin
MyLib.dll [Company.MyLibNameSpace.LibraryClass]
From Company.MyLibNameSpace.LibraryClass
I need to create an instance of Company.MyNameSpace.MyClass
, but I don't know Class name until execution (it comes from XML configuration), so I use Reflection for it:
Type type = Type.GetType("Company.MyNameSpace.MyClass")
The problem is, that when I load a Type from DLL, it doesn't work (type == null), when I do the same from another .cs file in App_Code folder, everything works fine. Is there any work-around to this problem?