I'm very new to .NET. I have been told enough times that it is the only way to go as far as AutoCAD programming goes, so I'm getting my feet wet. Setting up Visual Studio is a bit intimidating for someone that is accustomed to using VisualLISP. There is a LOT more to know and configure.
I have tried all the ways I could dig up to get VC# Express 2010 to go into debug mode. None of them seem to work. I cannot even load ACAD.exe as an additional project, since EXE files can't be selected in the dialog. I loaded the ObjectARX Wizards, and they help set up projects initially, but the debugging is still an issue.
I'm also a bit confused about which managed wrapper I should reference. According to some, the AcMGD.dll and AcDbMgd.dll should be referenced out of the AutoCAD installation folder, and others say to use the ones the SDK provides. Which is best, and why?
Sorry if these questions are painfully basic, but the interaction between AutoCAD and Visual Studio is not documented very well, even in the tutorials I have run. TIA.
Solved! Go to Solution.
class keyThumper<T> : Lazy<T>; another Swamper
Thanks for the info. I've looked over those resources, and the guide you linked to states plainly that it assumes the user has the Standard or Professional version of Visual Studio. I'm trying to do this in a way that makes sense for a non-professional programmer, and since we don't have VBA or VSTA, the Express versions of VS are the only real option, as I see it.
If someone out there can show me that VS Express 2010 can be configured to use an external program for debugging, I would be most appreciative. It looks like Microsoft is doing a better job of restricting the debugging functions with each release of Express, so perhaps they have finally gotten external debugging shut down. If that is the case, then I'm hoping that jumping back to VS Express 2008 would allow me to do what I need.
Does anyone have any input on using the SDK managed API resources versus the versions that ship with AutoCAD?
You haven't mentioned it specifically, so I have to ask: isn't there a small change that needs to be made to the .CSPROJ file when working in the VS Express edition?
That did the trick!
I added the lines highlighted in gray to the the .csproj file.
This change, in combination with uncommenting the
line the ACAD.EXE.CONFIG, has Visual C# Express 2010 starting AutoCAD and hitting breakpoints like a champ. Now I just have to figure out how to adjust the template that the .NET Wizard installed so my .csproj file will be set up correctly.
Thanks for the help and information!
No problem. Turns out I had lost the specifics of that change, so thank you for posting them.