.NET

Reply
Distinguished Contributor
OwenWhitehouse
Posts: 166
Registered: ‎09-23-2008
Message 1 of 7 (1,972 Views)
Accepted Solution

Visual C# Express 2010

1972 Views, 6 Replies
01-18-2011 11:49 AM

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.

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?

Valued Mentor
KerryBrown
Posts: 269
Registered: ‎11-29-2008
Message 2 of 7 (1,949 Views)

Re: Visual C# Express 2010

01-18-2011 06:35 PM in reply to: OwenWhitehouse

Try these

 

http://docs.autodesk.com/ACD/2011/ENU/filesMDG/WS1a9193826455f5ff2566ffd511ff6f8c7ca-4875.htm http://www.theswamp.org/index.php?topic=32381.0

//-------------------------------------------------------

class keyThumper<T> : Lazy<T>;      another  Swamper

Distinguished Contributor
OwenWhitehouse
Posts: 166
Registered: ‎09-23-2008
Message 3 of 7 (1,922 Views)

Re: Visual C# Express 2010

01-19-2011 06:59 AM in reply to: KerryBrown

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?

*Expert Elite*
dgorsman
Posts: 5,347
Registered: ‎10-12-2006
Message 4 of 7 (1,899 Views)

Re: Visual C# Express 2010

01-19-2011 02:45 PM in reply to: OwenWhitehouse

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?

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


Distinguished Contributor
OwenWhitehouse
Posts: 166
Registered: ‎09-23-2008
Message 5 of 7 (1,865 Views)

Re: Visual C# Express 2010

01-21-2011 11:17 AM in reply to: dgorsman

That did the trick!

 

I added the lines highlighted in gray to the the .csproj file.

 

C Sharp Debug

 

This change, in combination with uncommenting the

'<supportedRuntime version="v2.0.50727"/>'

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!

*Expert Elite*
dgorsman
Posts: 5,347
Registered: ‎10-12-2006
Message 6 of 7 (1,855 Views)

Re: Visual C# Express 2010

01-21-2011 11:38 AM in reply to: OwenWhitehouse

No problem.  Turns out I had lost the specifics of that change, so thank you for posting them.

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
Adopt. Adapt. Overcome. Or be overcome.
A good question will be halfway to a good answer.


Contributor
hoangvuminh
Posts: 11
Registered: ‎04-28-2011
Message 7 of 7 (1,301 Views)

Re: Visual C# Express 2010

05-19-2011 12:53 AM in reply to: OwenWhitehouse

Congratulation and thanx for the post. That was what i am looking for :smileywink:

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.