Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
JohanLarsson
657 Views, 3 Replies

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

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
Tags (3)
3 REPLIES 3
Message 2 of 4
FarrenYoung
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"
************************************************************************************
Message 3 of 4
JohanLarsson
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
Message 4 of 4
adam.nagy
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
Autodesk Platform Services

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report