Author Topic: AutoCAD 2017 Debug?  (Read 7937 times)

0 Members and 1 Guest are viewing this topic.

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
AutoCAD 2017 Debug?
« on: March 28, 2016, 09:25:51 PM »
Just wondering if anyone else has run into issues with this. I have found that none of my commands, nor the ribbon in it's entirety, work when attempting to Debug 2017 .NET projects...unless I enable the Use Managed Compatibility Mode in either VS2013 or VS2015.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2124
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD 2017 Debug?
« Reply #1 on: March 28, 2016, 10:17:13 PM »
Hi Jeff,
I saw a mention over on the AutoCAD .NET discussion forums


added link:
http://forums.autodesk.com/t5/net/first-steps-with-autocad-2017-and-vs2015/m-p/6232024#U6232024
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Bryco

  • Water Moccasin
  • Posts: 1882
Re: AutoCAD 2017 Debug?
« Reply #2 on: June 10, 2016, 02:25:07 PM »
For some reason I can not get my vs2015 .dll to netload in acad2017, let alone debug. (win 7 pro). Is there something special reqd?

Atook

  • Swamp Rat
  • Posts: 1027
  • AKA Tim
Re: AutoCAD 2017 Debug?
« Reply #3 on: June 10, 2016, 02:55:21 PM »
You may need to add the folder of your dll to the trusted locations under options. My understanding is that 2017 is more strict about loading dlls for increased security.

Bryco

  • Water Moccasin
  • Posts: 1882
Re: AutoCAD 2017 Debug?
« Reply #4 on: June 10, 2016, 05:02:51 PM »
tx,  I had done that (actually I put it in Acad2017 support which is trusted).
I copied the whole folder from vs2012 \projects to vs2015\projects  opened it in 2015 and rebuilt.  No red  problems shown

Atook

  • Swamp Rat
  • Posts: 1027
  • AKA Tim
Re: AutoCAD 2017 Debug?
« Reply #5 on: June 10, 2016, 05:19:24 PM »
Interesting, are you saying support paths in 2017 are automatically trusted?

Bryco

  • Water Moccasin
  • Posts: 1882
Re: AutoCAD 2017 Debug?
« Reply #6 on: June 10, 2016, 06:35:45 PM »
Quote
Application security has also been increased in the 2017 release. Whereas previously it was possible to place add-ins beneath %AppData% and %ProgramData% and have them trusted automatically, this is no longer the case: you will need to place them beneath %ProgramFiles% (which is still trusted), add the location of your module to TRUSTEDPATHS, or digitally sign your modules to avoid the unsigned/untrusted warning.
   from Kean

CADbloke

  • Bull Frog
  • Posts: 342
  • Crash Test Dummy
Re: AutoCAD 2017 Debug?
« Reply #7 on: June 10, 2016, 11:25:54 PM »
a marginally related heads-up: don't expect to have write access to folders under %ProgramFiles% - many of my users are on locked-down corporate PCs and don't have write access to this. They need to get a IT [insert derogative here] to install it but you shouldn't try to write anything to it like settings etc there because CRASH. ie. don't automatically expect you have write access to the folder it was installed in. Use %appdata% like ... Environment.ExpandEnvironmentVariables(@"%appdata%\blahblahblah");

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: AutoCAD 2017 Debug?
« Reply #8 on: June 13, 2016, 10:41:39 AM »
Slight derail of the original topic. I was asked a question about debugging with E & C using Acad 2016 in VS2015 so am posting a couple of screenshots of my Debug options (can't post attachments in a PM).

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2124
  • class keyThumper<T>:ILazy<T>
Re: AutoCAD 2017 Debug?
« Reply #9 on: June 13, 2016, 06:35:54 PM »

Thanks Jeff.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

Bryco

  • Water Moccasin
  • Posts: 1882
Re: AutoCAD 2017 Debug?
« Reply #10 on: June 17, 2016, 04:14:21 PM »
Well I downloaded the 2017 objectarx but forgot to change the references, oops.
I was hoping 2016 refs would work, now I am back to making 2 projects. I hope I have this wrong.

Atook

  • Swamp Rat
  • Posts: 1027
  • AKA Tim
Re: AutoCAD 2017 Debug?
« Reply #11 on: June 17, 2016, 05:22:44 PM »
Jeff, can you edit and continue with those settings?

I can't get CAD to run properly unless 'Use Managed Compatibility Mode' is checked.

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: AutoCAD 2017 Debug?
« Reply #12 on: June 17, 2016, 05:43:40 PM »
Atook, I can E&C in 2016, but not 2017. Using these settings renders my code, and the ribbon, useless in 2017. In order to Debug 2017, but no E & C, I must do the same as you.

Bryco

  • Water Moccasin
  • Posts: 1882
Re: AutoCAD 2017 Debug?
« Reply #13 on: June 17, 2016, 05:57:54 PM »
running acad 2016 from vs2015 I don't need 'Use Managed Compatibility Mode' checked but all the references are set to acad2016.
Didn't get the E&C to work yet. But I am using the community (free version).  Jeff you buy the pro version don't you?

edit Oh it does work, I still had "Use Native Compatibility Mode' checked.
Well done Jeff, thanks and peanuts
« Last Edit: June 17, 2016, 06:09:47 PM by Bryco »

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: AutoCAD 2017 Debug?
« Reply #14 on: June 17, 2016, 06:24:46 PM »
No, using the Community edition here as well. Just to show that I'm not blowing smoke....here's a mostly crappy video (got interrupted 3x in the less than 1 minute video!) showing that I can E & C in 2016 using VS2015: http://screencast.com/t/ryZd6aCWXA

Edit: Took me too long to reply, didn't see your edit...Oh well, have a good weekend, all!
« Last Edit: June 17, 2016, 06:29:27 PM by Jeff_M »