I'm making my first steps porting our application to AutoCAD2017 and VS2015.
I immediately found a weird behaviour: AutoCAD 2017 run from inside Visual Studio (just execuded acad.exe without netloading anything) starts without ribbon and the command _ribbon is unknown....
If I run AutoCAD 2017 outside Visual Studio everything is normal...
Also, no problems running AutoCAD 2015 inside Visual Studio.
My environment is Windows 8.1 64bit, Visual Studio 2015, AutoCAD 2017 64bit.
Any idea?
Solved! Go to Solution.
Solved by Virupaksha_aithal. Go to Solution.
Really?
I'd like to know if it's Microsoft's or Autodesk's responsibility... I just built a x64 development machine because I was able to use Edit&Continue with VS2013 and AutoCAD 2015/2016 and now you say I have to go back with a 32bit environment?!?
I'll investigate your suggestion though! Thank you!
Hi,
I have downloaded AutoCAD 2017 this morning and tried it with VS Community 2015 , AutoCAD did not run in Visual Studio.
After invoking AutoCAD 2017 from VS ,AutoCAD started but the netloadingloaded the .dll file but the command name of the program gives an error as it is unknown command name.
It seems a bad start with CAD 2017.
Hi,
>> If you turn on the Managed Compatibility Mode in the Debug options it should then show the Ribbon
>> and the commands will be known. However, you will lose the ability to Edit & Continue.
@Jeff_M THX for this solution, just run into the same problem now and found your response great.
As I just have setup a new system I thought I don't need VS2013 any more, but now the question raise up ... does VS2013 show the same issue or does VS2013 work better than VS2015 and - most important - is VS 2013 able to do edit-while-debug with AutoCAD 2017 64bit?
As the system is new and I want to mess it up at this early stage I don't want to install it just to know it is also not working 😉
Thx in advance, - alfred -
@Alfred.NESWADBA, problem exists in VS2013 and VS2015. So, for me, I do most of my debug work in C3D2016 as I have yet to implement any 2017 specific API calls. Then I just create a build for 2017 and run it outside of VS.
Jeff_M
I already downloaded AutoCAD 2017 and I already have VS community 2015 but when I debug a C# program it does not run AutoCAD 2017 inside VS.
So how do you convert from running AutoCAD inside or outside VS 2015 ?
Thank you
Hi,
>> problem exists in VS2013 and VS2015
@Jeff_M thx for information!
- alfred -
@_Tharwat, I setup my 2017 project just as I have my AutoCAD 2014-2016 projects. I do not recall having any issues geting it to run and debug, other than the Ribbon issue. I don't convert from running inside or outside of VS....to run 'outside' I just create a build, start Autocad normally, then netload that build. Here is how my Debug properties are setup:
I also have a .bundle autoloader setup and have my Debug builds output to the folder for 2017 there.
Thank you jeff_M
I already know and have these settings with every program but I am referring to debug a program with AutoCAD 2017 inside VS which is not available with my VS community 2015.
AutoCAD 2017 is not running inside VS 2015 but it loads autocad and run separately.
The first video shows that if I hit hi F5 and call netload and select the dll file it won't recognize the command call "msg" but if I run with Control + F5 it recognize the command name and show the related message correctly.
@Jeff_M wrote:
@_Tharwat, I seem to recall seing this issue in the past (in other versions of VS & Acad) but I'm not recalling what was causing it. Make sure all of your references for the Autocad managed assemblies are set "copy local = false" ?
For sure there are set to false otherwise you would see them near the dll file in the netload dialog
I have no probelm with VS nor even with AutoCAD 2017 but as I have read around that CAD 2017 would be running into VS Environment and that is what I am after.
Turn on checkbox for: Use Managed Compatibility Mode
in Tools->Options->Debug-General
I had the very same problem with 2017. This worked for me.
Doug
@douggoforth wrote:
Turn on checkbox for: Use Managed Compatibility Mode
in Tools->Options->Debug-General
I had the very same problem with 2017. This worked for me.
Doug
Thank you , it is really still with no effects.
Let us clear things up by clarifying this:
What does it mean when we say ( with AutoCAD 2017 will be running inside VS 2015 ) ?
Does it mean that somehow AutoCAD 2017 would be used by VS 2015 as an Application to test the codes in VS environment or scope ?
Thanks
Hi @_Tharwat - Good to see another friend here.
Yes, when you debug an AutoCAD plugin, VS launches an AutoCAD process as startup object. Normally, your assembly needs to be manually netloaded, but you can setup an Autoloader .bundle, and change your build settings to instead compile to there, so the Assembly will be loaded automagically.
Within VS refers to controlling the start/launch, and stop of the AutoCAD process from VS via debug/F5.
outside of VS refers to simply building your assembly, manually launching AutoCAD, and netloading the resultant assembly. This option does not allow you to debug via break points, review watch items, etc.
What we're talking about above, is the fact that 2017 does not currently support proper debug functionality, without intentionally disabling useful features in VS2015, which pretty much defeats the purpose of using it in the first place.
HTH
"How we think determines what we do, and what we do determines what we get."
There is a known issue that is currently being looked into that was fixed in a previous release of the AutoCAD Managed .NET libraries and has since resurfaced in AutoCAD 2017. There are two known work arounds at the moment to allow debugging with Visual Studio:
This does cause problems with Edit & Continue though as mentioned previously in Kean's blog:
Can't find what you're looking for? Ask the community or share your knowledge.