So here\'s the deal. I\'ve got my solution which has a few projects in it:
Is pluginTypeName using assembly-qualified naming? Is the Assembly that contains pluginTypeName showing as being loaded?
If you're using the Assembly-qualified name then .NET should be able to automatically load the assembly for you; if you aren't then I would guess that Type.GetType()
is returning null since it can't locate an assembly containing the requested type.
Instead of calling Type.GetType(pluginTypeName)
, try Type.GetType(pluginTypeName, true)
. The boolean parameter indicates if the call should throw an exception in the event of a failure, instead of returning null
- this way, you should get a (hopefully) better description of why GetType is failing instead of just a mysterious null
!
It could be that you need to specify which assembly the type is located in:
<add key="Plugin" value="Prototypes.BensPlugin, TheAssemblyName" />