.NET

Reply
Valued Contributor
edweberg
Posts: 95
Registered: ‎01-29-2007
Message 1 of 7 (202 Views)
Accepted Solution

Help migrating VB.NET projects to ACAD2015

202 Views, 6 Replies
05-08-2014 07:54 AM

Greetings,

I need some help really fast.  Our department is migrating from ACAD2013 to ACAD2015 (we skipped 14).  I have a lot of applications I've written in VB.NET for ACAD which automate tasks we routinely perform.  So I need to go through and save the projects with 2015 references, publish new dlls etc. for the group to use.

 

I added the same three references to ACAD2015 as I did in ACAD2013 (accoremgd, acdbmgd, acmgd).  It all looks the same as before except everything is an error.  20 Namespace warnings and 12 actual errors of objects not defined (things like "CommandMethod", "Document", Editor" etc.).  

 

What am I missing?  Are there new references I need to add?  What changed?  There must be something I'm not doing, but I've done everything I can think of and exactly what I did when migrating from 12 to 13.  

 

What changed for me this morning was that I uninstalled ACAD2013 (I have 2015 installed, of course).  That's when everything went wrong at the project level in visual studio.  

 

Anything you can tell me is valuable.

 

Thank you,

 

Erik

Valued Contributor
edweberg
Posts: 95
Registered: ‎01-29-2007
Message 2 of 7 (195 Views)

Re: Help migrating VB.NET projects to ACAD2015

05-08-2014 09:36 AM in reply to: edweberg

Ok, here's some more data.

 

The warnings indicate that the references I'm invoking (see above) were built against .NETFramework v4.5 and I'm targetting v4.0.

 

So I went to the compiler settings, and sure enough, .NET Framework 4

 

So I downloaded .NET Framework 4.5 from Microsoft and installed that.

 

But in v4.5 is still not listed as available in the Target Framework in Advanced Compiler Settings.  

 

Apparently, in order to use the ACAD2015 references I need .NET Framework 4.5 which I have installed but Visual Studio is not recognizing the v4.5, only the v4 which is inadequate.

 

I'm running Windows 7, 64-bit.

 

Any suggestions?

 

Erik

 

*Expert Elite*
_gile
Posts: 2,082
Registered: ‎04-29-2006
Message 3 of 7 (194 Views)

Re : Help migrating VB.NET projects to ACAD2015

05-08-2014 09:46 AM in reply to: edweberg

Hi,

 

First, did you tried to load and use the .NET assemblies built against AutoCAD 2013 libaries with AutoCAD 2015 ? Most of the time they should work and don't need any change or re-compilation.

 

 

 

 

 

Gilles Chanteau
*Expert Elite*
_gile
Posts: 2,082
Registered: ‎04-29-2006
Message 4 of 7 (191 Views)

Re: Help migrating VB.NET projects to ACAD2015

05-08-2014 09:50 AM in reply to: edweberg

If you really need/want reference AutoCAD 2015 .NET libraries and/or target the Framework 4.5, you need to use Visual Studio 2012 (or 2013).

Gilles Chanteau
Valued Contributor
edweberg
Posts: 95
Registered: ‎01-29-2007
Message 5 of 7 (188 Views)

Re: Help migrating VB.NET projects to ACAD2015

05-08-2014 10:09 AM in reply to: _gile

Well, I don't necessarily want to make these changes.  In fact, I've been running ACAD2015 for some time and using the automation I've written with the 2013 references with no problem.  However, this morning I uninstalled ACAD2013.  Then I opened one of my projects in Visual Studio 2010 and all the warnings and errors showed up.  Apparently, in order to use the ACAD2013 references in my Visual Studio projects I still need to have ACAD2013 installed on my machine.

 

The dlls work fine and the automation works fine.  What I can't do without updating is make updates in the vb.net projects or write new code.  I can use what is existing, but can't make changes or write anything new. 

 

I installed visual studio 2012 express and am currently navigating through the product registration with Microsoft

 

Am I heading down the right path?

 

Thanks,

 

Erik

 

*Expert Elite*
_gile
Posts: 2,082
Registered: ‎04-29-2006
Message 6 of 7 (186 Views)

Re: Help migrating VB.NET projects to ACAD2015

05-08-2014 11:15 AM in reply to: edweberg

Did you referenced the AutoCAD libraries from the AutoCAD install folder ? If so, this explained why you're getting these warnings and errors.

You'd rather download the ObjectARX versions corresponding to the AutoCAD versions you want target and reference the libraries from the ObjectARX 20XX\inc folder so that you can use the Visual Studio solutions even if the AutoCAD version isn't installed.

Gilles Chanteau
Valued Contributor
edweberg
Posts: 95
Registered: ‎01-29-2007
Message 7 of 7 (179 Views)

Re: Help migrating VB.NET projects to ACAD2015

05-08-2014 12:22 PM in reply to: _gile

Thank you so much!  That did the trick.

With the ObjectARX references for ACAD2013 I can use the code as-is in visual studio 2010.  Just have to redirect the references to the ObjectARX folder rather than the ACAD2015 Program folder.  I didn't realize that was an option.

 

Thank you.

 

Erik

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.