.NET

Reply
Active Member
jiallxy
Posts: 8
Registered: ‎12-20-2012
Message 1 of 11 (688 Views)
Accepted Solution

what happen to the file of AcMgd.dll in my project

688 Views, 10 Replies
12-20-2012 09:58 PM

 Hi ,

 

Is there somebody can help me?

 

Everytime, I build my project, there is following warning coming out and asks me to remove the reference file "ACMgd".

 

Warning 1

 The referenced assembly "AcMgd" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, 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. AutoCADHoodDWG

 

Best regards,

 

Jusitn


jiallxy wrote:

 Hi ,

 

Is there somebody can help me?

 

Everytime, I build my project, there is following warning coming out and asks me to remove the reference file "ACMgd".

 

Warning 1

 The referenced assembly "AcMgd" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, 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. AutoCADHoodDWG

 

Best regards,

 

Jusitn



Try retargeting to full .NET 4.0 version instead of Client.

Now than you mentioned this:

 

<quote>

I use VS 2010 C# to program a stand alone application.

</quote>

 

Please be aware, the Acad .NET API assemblies (acdbmgd.dll/acmgd.dll...) can only be used inside AutoCAD (if you do Acad addin DLL project). You CANNOT use them with stand-alone EXE project.


jiallxy wrote:

Hi

 

I use autocad2012 64bit version with win7 64bit os. The C:\ObjectARX 2012 is my folder for ObjectARX.

 

I use VS 2010 C# to program a stand alone application.

 

all of them are reommended by autodesk's website. They shuould work together properly.


Do I understand correctly that you're trying to make external exe-file (not dll-file that will be loaded with NETLOAD command into AutoCAD)? If so, then you can not use acmgd.dll and acdbmgd.dll in your project.

Contributor
glanard
Posts: 20
Registered: ‎09-29-2006
Message 2 of 11 (679 Views)

Re: what happen to the file of AcMgd.dll in my project

12-20-2012 10:38 PM in reply to: jiallxy

Hi,

 

- Do you use the correct release of ObjectArx?

- In VS, did you switch its "Local Copy" property to FALSE?

 

Regards,

Valued Contributor
amanero
Posts: 75
Registered: ‎12-03-2003
Message 3 of 11 (667 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 04:32 AM in reply to: jiallxy

I suppose that you are working with Autocad 2013, if I'm correct, review yor project properties, the target .NET Framework for your app mus be 4.0 (probably you have 3.5).

Luis Alberto Manero, Geograma.com
Active Member
jiallxy
Posts: 8
Registered: ‎12-20-2012
Message 4 of 11 (663 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 05:57 AM in reply to: glanard

Hi

 

I use autocad2012 64bit version with win7 64bit os. The C:\ObjectARX 2012 is my folder for ObjectARX.

 

I use VS 2010 C# to program a stand alone application.

 

all of them are reommended by autodesk's website. They shuould work together properly.

Valued Mentor
jeff
Posts: 335
Registered: ‎05-12-2009
Message 5 of 11 (651 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 06:29 AM in reply to: jiallxy

jiallxy wrote:

 Hi ,

 

Is there somebody can help me?

 

Everytime, I build my project, there is following warning coming out and asks me to remove the reference file "ACMgd".

 

Warning 1

 The referenced assembly "AcMgd" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, 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. AutoCADHoodDWG

 

Best regards,

 

Jusitn



Try retargeting to full .NET 4.0 version instead of Client.
You can also find your answers @ TheSwamp
*Expert Elite*
norman.yuan
Posts: 1,045
Registered: ‎04-27-2009
Message 6 of 11 (640 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 07:48 AM in reply to: jiallxy

Now than you mentioned this:

 

<quote>

I use VS 2010 C# to program a stand alone application.

</quote>

 

Please be aware, the Acad .NET API assemblies (acdbmgd.dll/acmgd.dll...) can only be used inside AutoCAD (if you do Acad addin DLL project). You CANNOT use them with stand-alone EXE project.

Moderator
Alexander.Rivilis
Posts: 1,449
Registered: ‎04-09-2008
Message 7 of 11 (640 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 07:54 AM in reply to: jiallxy

jiallxy wrote:

Hi

 

I use autocad2012 64bit version with win7 64bit os. The C:\ObjectARX 2012 is my folder for ObjectARX.

 

I use VS 2010 C# to program a stand alone application.

 

all of them are reommended by autodesk's website. They shuould work together properly.


Do I understand correctly that you're trying to make external exe-file (not dll-file that will be loaded with NETLOAD command into AutoCAD)? If so, then you can not use acmgd.dll and acdbmgd.dll in your project.


Пожалуйста не забывайте про Утвердить в качестве решения! Утвердить в качестве решения и Give Kudos!Баллы
Please remember to Accept Solution! Accept as Solution and Give Kudos!Kudos

Active Member
jiallxy
Posts: 8
Registered: ‎12-20-2012
Message 8 of 11 (624 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 11:54 AM in reply to: Alexander.Rivilis

Yes, you are right.

 

I have just found that these two dll files only can be used in add-in projects.

 

I have to use COM interop: Autodesk.AutoCAD.Interop

 

The problem is that the COM interop have less good functions and is more difficult to program.

 

I will try to balance which way I should choose.

 

thank you very much!

 

Active Member
jiallxy
Posts: 8
Registered: ‎12-20-2012
Message 9 of 11 (623 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 11:56 AM in reply to: norman.yuan

Yes, you are right.

 

I have just found that these two dll files only can be used in add-in projects.

 

I have to use COM interop: Autodesk.AutoCAD.Interop for standalone application.

 

The problem is that the COM interop have less good functions and is more difficult to program.

 

I will try to balance which way I should choose.

 

thank you very much!

Active Member
jiallxy
Posts: 8
Registered: ‎12-20-2012
Message 10 of 11 (621 Views)

Re: what happen to the file of AcMgd.dll in my project

12-21-2012 11:57 AM in reply to: jeff

Thank you!

 

I changed the framework type, and it works!

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!