So, you do see ""Unknown Command" prompt at command line when trying to execute a custom command defined in the loaded DLL, right?
One possible reason for this issue: does the loaded DLL contain a class that is an ExtensionApplication (e.g. it implements IExtensionApplication interface)? If yes, do you have code doing something in the implemented Initialize() method (I guess you do, if a class does implement IExtensionApplication)? Then, do you have try...catch{} block that wraps up all code in Initialize()?
If there is an exception occurs in Initialize() without being caught, AutoCAD simply silently jumps out Intialize() and then the loaded DLL becomes useless, thus the commands defined in it can not be recognised by AutoCAD.