Hi,
I've been working on a .Net Addin since AutoCAD 2009 and have been adapting/extending it over the years to work with the various versions of AutoCAD I've used (AutoCAD 2013, 2016, 2018 and now 2020).
It has run as expected in all versions until 2020. Granted, there have been Exceptions thrown over the time but always due to errors in my code and acted predictably. By predictably, I mean if there was an exception thrown, then unless I resolved it, it would continue to be thrown at the same line of code.
With AutoCAD 2020, I'm getting System.AccessViolationException thrown at different points of execution with really nothing else changing. I have Visual Studio set to Debug the addin by running AutoCAD 2020 and opening a specific drawing file. After that, I type a simple command to load the .Net Addin which goes through a set of initialization procedures for the drawing (loading blocks, initializing layouts, etc), BUT will ultimately terminate with a System.AccessViolationException at some point. I'm not saving the file or anything along the way so I'd expect two consecutive Debug Runs to terminate at the same place, but it doesn't. Heck, I've seen it throw the Exception when simply trying to Create a new XmlSerializer based on a custom Serialized class that I KNOW works. It doesn't make ANY sense!
Funny thing is, the addin still works fine when ran in AutoCAD 2018.
Has anyone had similar issues?
Any recommendations?! Any feedback you can provide is TRULY appreciated.
Best Regards,
Chris