Author Topic: PInvoke color settings and release build configuration issue  (Read 2006 times)

0 Members and 1 Guest are viewing this topic.

Chumplybum

  • Newt
  • Posts: 97
Hi All,

I'm working on a routine that uses the colors from the autocad editor (in this case its the background color in modelspace) and i'm having an issue when I use the 'release' configuration version of the app. I've run many tests and think it has something to do with disposing of unmanaged objects but i'm not 100% sure this is the case.
When debugging from visual studio, in either 'debug' or 'release' configurations, the app works fine. The issue comes when i'm not debugging from VS and just netload the dll after starting AutoCAD (hopefully that makes sense... ie, using autocad as normal, not through visual studio debugging).
If i load in the dll from the debug folder, the app works... its when i load the dll from the release folder that the app crashes autocad. There is no crash report either, just a 'AutoCAD Application has stopped working' dialog.

I've attached 2 files (vb & c#) that are the project files (I created the c# project just to test to see if the compiler was doing something different between the 2 languages) and my current setup is windows 7 64bit, visual studio 2012 and testing against AutoCAD Civil 3D 2013.

Any help would be great.


Cheers, Mark