Inventor Customization

Reply
Valued Mentor
JohanLarsson
Posts: 425
Registered: ‎06-14-2005
Message 1 of 4 (319 Views)
Accepted Solution

Is there a way to target .net 4 for an Inventor 2012 add-in?

319 Views, 3 Replies
09-19-2012 12:43 PM

We have a large code base that is migrated to .net 4. I did not find an easy way to target .net 4 when writing an add-in for Inventor 2012.

 

Is there a solution to this?

-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
Mentor
FarrenYoung
Posts: 263
Registered: ‎07-13-2009
Message 2 of 4 (301 Views)

Re: Is there a way to target .net 4 for an Inventor 2012 add-in?

09-20-2012 09:05 AM in reply to: JohanLarsson

Hello,

 

It seems like I was able to do this once using a "registry-based" addin.  I know it's a step back since we're told to use "registry-free" addins in Inventor 2012 foward, but I think this works.  Can you try that and let us know?

 

Thanks,

--Farren

************************************************************************************
If this post helps, please click the "thumbs up" to give kudos
If this post answers your question, please click "Accept as Solution"
************************************************************************************
Valued Mentor
JohanLarsson
Posts: 425
Registered: ‎06-14-2005
Message 3 of 4 (292 Views)

Re: Is there a way to target .net 4 for an Inventor 2012 add-in?

09-20-2012 11:35 PM in reply to: FarrenYoung

Thank you for this idea, maybe someone from Adesk can chime in and confirm if this is a possibility in theory?

My gut feeling tells me that the problem with the Adesk 3.5 file needing to reference my 4.0 dlls might remain.

-------------------------------------------------------------------------
Inventor Professional 2012 SP1 (25 seats with subscription)
Windows 7 64 bit
Lenovo D20, 12 GB RAM, Intel Xeon X5687 3.6 GHz, SSD
Quadro 4000, driver 8.17.12.9573, dual monitors
SpacePilot, driver version 6.15.3 Firmware 3.12
ADN Support Specialist
adam.nagy
Posts: 521
Registered: ‎03-26-2007
Message 4 of 4 (246 Views)

Re: Is there a way to target .net 4 for an Inventor 2012 add-in?

10-09-2012 11:06 AM in reply to: JohanLarsson

Hi Johan,

 

Yes, what Farren said seems to work. I assume because of the Side by Side execution feature of .NET 4: http://blogs.microsoft.co.il/blogs/arik/archive/2011/05/30/how-to-use-a-net-4-based-dll-from-net-2-b...

 

Actually, I thought that the Reg-Free version could work as well, but I did not manage to achieve that.

 

Another thing you can do is force Inventor to use the .NET 4 Framework. This seems to work fine, but still it is unsupported, so if you run into any problems with it then we cannot help.

In order to do that you need to make sure that the <startup></startup> section of Inventor.exe.config has the following:

 

  <startup useLegacyV2RuntimeActivationPolicy="true">

    <supportedRuntimeversion="v4.0"/>

  </startup

 

I hope this helps.

 

Cheers,



Adam Nagy
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube