.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Debugging .NET: Autocad 2013 with Visual Studio 2012
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
As the title of the question indicates I am using Autocad 2013 and Visual Studio 2012. I have installed the ObjectARX 2013 SDK and have built one of the .NET samples - Prompts.csproj for example - and have successfully installed the DLL using NETLOAD. The only problem is that I cannot debug. If I use Visual Studio to attach to the acad.exe process both Autocad and Visual Studio will freeze as soon as I run one of the Prompts.cs commands and attempt to hit a breakpoint.
Visual Studio project settings of interest:
- platform target is Any CPU (I have tried all the options. Same problem)
- Target framework is .NET Framework 4.5
- Referenced DLLs are set to Copy Local = True (I have tried both True and False. Same problem).
Between not being able to reload a .NET DLL without restarting Autocad (because of the well known lack of a NETUNLOAD function), and not being able to debug into my code this is a very challenging development environment. I am blind with both hands tied behind my back. Any suggestions are most appreciated.
Thanks
Solved! Go to Solution.
Re: Debugging .NET: Autocad 2013 with Visual Studio 2012
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hi,
>> If I use Visual Studio to attach to the acad.exe process
I never use the "attach to existing process", I have my project settings defined to start AutoCAD when I click onto "start" in my project.
>> Target framework is .NET Framework 4.5
Has to be 4.0
>> Referenced DLLs are set to Copy Local = True
Has to be set to false
Good luck, - alfred -
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Re: Debugging .NET: Autocad 2013 with Visual Studio 2012
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
I'll be damned! That worked. Thanks Alfred. Framework 4 instead of 4.5. Who knew?
FYI In case anyone else is trying to set up an effective development environment there's a nifty little NetReload utility out there that allows one to make rapid code changes and reload your assembly on the fly via a clever workaround to the AppDomain problem. You can't line debug that way, but if you need to quickly try new things and don't want to burn the time to constantly restart Autocad it's pretry neat.
Re: Debugging .NET: Autocad 2013 with Visual Studio 2012
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Hello,
I am doing exactly the sam thing, everything works fine for me, I can step into (F8) but the problem is I can't see what is happening in AutoCAD step by step because it can't be activated or refreshed durind debug. At the end of the run AutoCAD activates and I see the whole process. I want to see step by step what happens each line of code execute. How to do this?
Best Regards
VS2012
Autocad 2012
AutoCAD 2012 (x64)
