I have a strange situation where commands I have defined in a .Net plugin unpredictably are not available. I have only observed this behavior on machines running Win8.1 and AutoCAD 2014 SP1, but other configurations may be affected (though a great deal of testing has been done in Windows 7 and this probem has never been reported).
My implementation of Autodesk.AutoCAD.Runtime.IExtensionApplication.Initialize in the affected class always runs, but sometimes the commands defined are not recognized. I observed today in one case that initially, the commands defined in my class (the only class in my plugin assembly where AutoCAD commands are defined), are consistently available. However, after a very heavy routine is run (which frankly currently seems to leak a large amount of memory), the command becomes unavailable when AutoCAD is restarted and stays that way. If I restart AutoCAD 10 times, the command might be available only once. I have tried restarting Windows as well, with no improvement. There have been reports from users of this same behavior on other machines running Win8x, but never to the extent I observed today. In these other instances, the previously mentioned "heavy routine" is not run. The comamnd just is sometimes not available and restarting AutoCAD is required.
I would post code, but the plugin in question has become prohibitively large and complicated. There are likely hundreds of thousands of lines of code in the plugin if you include all assemblies loaded into the app domain. I will gladly post portions of the code if it becomes relevant.
I am wondering if any of you who might read this have observed this behavior and have identified a root cause. Any insights are most welcome. I began to wonder today of AutoCAD has a mechanism for detecting misbehaving .Net plugin commands and making them unavailable. Are any of you aware of such a feature? The fact that i have never observed this behavior in my Windows 7 / AutoCAD 2014 development environment, and that no users running Windows 7 / AutoCAD 2014 have reported the behavior doesn't fit with that theory, however.
I use the autoloader to load my plugin automatically, but I have tried removing the plugin from affected machines and using the AutoCAD NetLoad command instead with the same results (Command Unknown, does not show up in inteli sense).
Again, i would be grateful for any insights at all into what might cause this on any platform, or why this might occur on Win8 and not Win7. I have checked the AutoCAD command console for errors and see none. I've added exception handling and logging to the EventLog to the method implementing Autodesk.AutoCAD.Runtime.IExtensionApplication.Initialize, and no errors are ever logged or reported by AutoCAD (that I can find, maybe I am not looking in the right location?).
Thank you for your help,
Kevin