Well, you guessed, I'm new into AutoCAD programming.
I'm using VS2010 and AutoCAD 2012.
So, I have referenced acdmgd and acmdg but but I always get this error. Same error for EditorInput namespace.
I tried to reference dll from SDK or AutoCAD but same error:
"C:\Program Files\Autodesk\AutoCAD 2012 - English"
This is all I got when browsing the dll:
I'm also getting this warning:
The referenced assembly "acmgd" could not be resolved because it has a dependency on "System.Web, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project.
Thanks you for your help!
Solved! Go to Solution.
Are you using VS2010 (or Visual Express 2010)? That is required.
After that, for C#, go to project properties, application tab, then select ".NET Framework 4.0" at target list (do not select Client Profile)
Autodesk Developer Network
Have you also set reference to acmgd.dll, which is the containing assembly of the namespace "Autpdesk.AutoCAD.ApplicationServices".
Unless you are doing RealDwg development, you ALWAYS need to set reference to both acdbmgd.dll AND acmgd.dll.
But in your case, this is because of .NET version exception causes this issue
My project is very similar. Sometimes it does compile though! Just before a compile, there will be no errors, but as I hit compile, I get the same errors as shown above. Both references have been added.
I am using VB though, and not C#. I cannot find the .NET Framework 4.0 selection in the project properties. Anything else I can try.
Thank you very much
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register