.NET
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Problems with the dotNET wizard - references and breakpoint s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Tried just starting Visual Studio, then:
- Create a class library project (tried both .NET 4.0 and 3.5 as targets)
- Put in the runtime references as usual, AcDbMgd & AcMgd
- Created a simple <CommandMethod> as before
- In Debug -> Configuration, set to "Debug" - not "Active (Debug)"
- In Debug - Start external program: C:\Program Files\Autodesk\ACADM 2011\acad.exe
- F5...
With both 3.5 and 4.0 targets, AutoCAD appears to be unhappy, throws an exception:
"Provide value on 'System.Windows.Markup.StaticExtension' threw an exception."
AutoCAD is frozen at this point, though it dies gracefully when I do "Stop Debugging".
I think I tried this before last year and also didn't have any luck. Maybe the wizard is doing some other magic to launch AutoCAD properly?
I'm going to try a few other things and report back later. Thanks for helping. Maybe others will also find this helpful.
Gary
Re: Problems with the dotNET wizard - references and breakpoint s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
> 1. I never used the wizard (and do not feel I ever need it). But I can imagine the reference to COM APIs contained in Autodesk.AutoCAD.Interop and ObjectDBX Common Library is not MUST-HAVE stuff, so by default the wizard may not add reference to them.
I didn't add anything to the code the wizard produced other than that basic command method. It targets .NET 3.5.
It had unresolved symbols marked red when I tried to save, pretty much all of them. I did notice that the Interop references were there, but the instructions for the Wizard implied that you don't need them. Here's what I get:
And...
Everything I've read and heard says to use .NET 3.5 as a target for ObjectARX.
When I use the checkboxs provided by the wizard for Interop, I *still* get unresolved symbols (even after saving and restarting Visual Studio and reloading the project.
Can't help but wonder if there's something weird about my system (?). I'm running vanilla Win7 and Visual Studio, no special mods or anything. Same with AutoCAD, other than the ObjectARX development I'm doing. My plugins work fine, they just won't allow debugging.
Gary
Re: Problems with the dotNET wizard - references and breakpoint s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
OK, tried again this morning with the non-wizard method. Last time I forgot to set CopyLocal=False on the references. That's apparently why AutoCAD was throwing an exception. This time the behavior was exactly like the wizard version, everything worked, just didn't stop at the breakpoint.
Gary
Re: Problems with the dotNET wizard - references and breakpoint s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
Did you do this? After acad starts, type NETLOAD, select the dll from Bin/Debug?
Re: Problems with the dotNET wizard - references and breakpoint s
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content



