Debugging AutoCAD 2008 with Visual Studio 2010 Express

Debugging AutoCAD 2008 with Visual Studio 2010 Express

Anonymous
Not applicable
2,336 Views
3 Replies
Message 1 of 4

Debugging AutoCAD 2008 with Visual Studio 2010 Express

Anonymous
Not applicable

I have read various forum posts and seen different google responses. Is it possible to debug a .net project in AutoCAD 2008 with Visual Studio 2010?

 

I have modified the acad.exe.config file as shown below:

 

<configuration>
   <startup>
        <supportedRuntime version="v2.0.50727"/>
   </startup>
</configuration>



And I have set the visual studio debug options to:

 

Command Line Arguments: start acad.exe
Working Directory: C:\Program Files\AutoCAD Architecture 2008\
Enable the Visual Studio Hosting Process: Checked

I build the project, then i try to start debugging. I get the following error:

System.Reflection.ReflectionTypeLoadException was unhandled
  Message=Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
  Source=mscorlib

Any help would be much appreciated. Thanks in advance.

0 Likes
Accepted solutions (1)
2,337 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

I use option 3 as recommended in this article. From through-the-interface

Works fine for me.

 

ed. - Actually, I'm not using Express so I don't know if that option will work for you.

0 Likes
Message 3 of 4

Anonymous
Not applicable

Perhaps someone else can tell me otherwise, but option 3 doesn't work for me because VS2010 Express doesn't let me add an exe as an existing project.

0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution

I found the solution for C# here:http://forums.autodesk.com/t5/NET/Visual-C-Express-2010/m-p/2886742#M22282

 

This fix also works for vb.net, just modify the .vbproj instead of .csproj.

0 Likes