Make custom Add-In be compatible with multiple Inventor releases

Make custom Add-In be compatible with multiple Inventor releases

Maxim-CADman77
Advisor Advisor
993 Views
18 Replies
Message 1 of 19

Make custom Add-In be compatible with multiple Inventor releases

Maxim-CADman77
Advisor
Advisor

I see Autodesk has several extra Add-Ins that are compatible with multiple Inventor releases.
Moreover, they for sure were developed using (at least two) different technological ways.

 

For example:

1. Autodesk Mesh Enabler
Installer for version 1.0.17 creates 16 folders (each containing separate set of DLLs for particular Inventor release from 2013 to 2025 and 3 more for Releases with ServicePack):

MaximCADman77_0-1744214208153.png


2. Autodesk Design Checker
Installer for version 1.0.18 creates just two set of DLLs (I believe first for .NetFramework and second for .Net(Core))

MaximCADman77_1-1744214278412.png


I'd like to know how can I do my Add-In be multi-release compatible?

 

Dear, @MjDeck , maybe you can say couple inspiring words?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
994 Views
18 Replies
Replies (18)
Message 2 of 19

hollypapp65
Advocate
Advocate

Build each version and put them in correct folders:

https://help.autodesk.com/view/INVNTOR/2024/ENU/?guid=GUID-52422162-1784-4E8F-B495-CDB7BE9987AB

 

You can save VS solution to new name and change IV reference to new release.

Addin-07.jpg

 

Addin-08.jpg

I used to have multiple IV versions installed.  This allow testing in new IV while using old IV.

Only build setting and referenced libraries changed.  Code remain the same for all the different versions.

 

 

If the addin doesn't need new feature or feature didn't get removed, it'll work in "future" release.

Here is a 2017 addin still works in 2023:

Addin-09.jpg

 

0 Likes
Message 3 of 19

MjDeck
Autodesk
Autodesk

Hi Maxim - It depends on how complex your add-in is, and whether it depends on newer interfaces or functions in the Inventor API or in the system.
Are you using Visual Basic or C#?
You might be able to make it work with a single add-in targeted to the oldest release that you want to support.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 4 of 19

Maxim-CADman77
Advisor
Advisor

I mostly use Visual Basic now, and I don't think my Add-Ins are complex or relay on newer functions.

Yet, after I've updated my Add-In (that successfully worked with 2022-2024) to make it work on 2025 - it now works within 2026 but not with 2024 and earlier.


Just in case - I used to place my Add-Ins to "All users, Version Independent" folder  (C:\ProgramData\Autodesk\Inventor Addins\) 

 

I don't like the way of Mesh Enabler (just don't want to support several ?forks? for releases that rely on same .Net version).

 

Design Checker workflow seems more reasonable for me (even so I can't say I understand it clear enough to follow it).

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 5 of 19

Maxim-CADman77
Advisor
Advisor

Dear @hollypapp65,
Using several solutions is last thing I would think of.
Can't same be done with several projects within single solution?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 6 of 19

hollypapp65
Advocate
Advocate

The solutions are just different build instructions.

They all use same code.

 

I don't know if different project could use same code/program.

 

My build folders are not "correct".  Probably could it the same as IV addin folders.

 

With this setup, only change the code/program once and rebuild all the solutions.

Maybe a build script to do all the different builds?

0 Likes
Message 7 of 19

YuhanZhang
Autodesk
Autodesk

Hi @Maxim-CADman77 

 

You posted two addins that I uploaded to App Store, and according to your statement seems your addin now is similar to Design Checker. So the case for Design Checker is that it was created with .Net Framework which works well with Inventor 2024 and previouse builds, but since Inventor 2025(which migrated to .Net 8) some functions in Design Checker that reference to .Net Framework assemblies are not compatible with .Net 8 so it can't be loaded within Inventor 2025, that is why we migrated the project to .Net 8, so now we have two projects, one is .Net Framework-based, the other one is .Net 8-based. Thus we will generate two DLLs, and we have two folders for them(Windows and WindowsNetCore), and in each folder we have an Autodesk.DesignChecker.Inventor.addin file which can configure the load behavior for the DLL, as you can see in the Windows folder it specifies

 

<SupportedSoftwareVersionGreaterThan>16..</SupportedSoftwareVersionGreaterThan>
<SupportedSoftwareVersionLessThan>29..</SupportedSoftwareVersionLessThan>

 

This means this DLL supports Inventor 2013 to Inventor 2024 to load it (major version 16 indicates Inventor 2012 while 29 indicates Inventor 2025), and Inventor 2025 and later versions will ignore this DLL. While in WindowsNetCore the .addin file specifies that only Inventor 2025 and 2026 can load the DLL in the same folder:

 

<SupportedSoftwareVersionGreaterThan>28..</SupportedSoftwareVersionGreaterThan>
<SupportedSoftwareVersionLessThan>31..</SupportedSoftwareVersionLessThan>

As @hollypapp65 mentioned you can find the detailed info about how to configure the .addin file to set the load status for an addin DLL:

 

Inventor 2024 Help | Creating an Add-In | Autodesk

 

While for the MeshEnabler addin, its DLL strongly binds with Inventor version, so for each major Inventor version we generate a DLL for it(some are even for minor versions), and in .addin file we specify the specific Inventor version to load it. Like below setting only allows Inventor 2025 to load the DLL which you can find in Autodesk MeshEnabler 2025.bundle folder:

<SupportedSoftwareVersionEqualTo>29..</SupportedSoftwareVersionEqualTo>

 

So in the .addin file you can specify either a range of Inventor versions or a specific Inventor version(major or minor version) to load the DLL in the same folder by combination of below tags:

<SupportedSoftwareVersionEqualTo>
<SupportedSoftwareVersionGreaterThan>
<SupportedSoftwareVersionLessThan>
<SupportedSoftwareVersionNotEqualTo>

 

Hope above explains, and let me if you have any more questions about how to configure the .addin file.

(Please note that not all the .Net Framework-based projects should be migrated to .Net Core, if the addin still works with Inventor 2025 or later versions you don't have to migrate them).



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 8 of 19

Maxim-CADman77
Advisor
Advisor

Dear @YuhanZhang,
About Design Checker:
I see it duplicates some files (several DLLs and subfolder 'iLogic').
I wonder if things can be organized so as to not duplicate any files that don't differ for NetFramework and NetCore (resources etc)?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 9 of 19

YuhanZhang
Autodesk
Autodesk

Hi @Maxim-CADman77 ,

 

Of course you can. If the files are exactly the same you can consider to put them in a shared folder to reduce the size of the whole addin(e.g.  if you want to create an installer for app store). This is also a good suggestion for me that I can consider this for Design Checker later version.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 10 of 19

Maxim-CADman77
Advisor
Advisor

@YuhanZhang 
1. What method do you use to split Design Checker code for Net/NetFramework (two projects within one solution or two different solutions or something other)? 
2. Which IDE do you use?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 11 of 19

YuhanZhang
Autodesk
Autodesk

Hi @Maxim-CADman77 

I have two projects, one is for .Net Framework and the other one is for .Net 8. As you may know we provided the steps about how to migrate your .Net Framework-based project to .Net 8 in below article since Inventor 2025:

 

        Inventor 2026 Help | Port .Net Framework-based project to .Net | Autodesk

 

As usual you can create a copy of .Net Framework-based project then follow the steps to migrate it to .Net 8, it requires Visual Studio 2022 (17.8 or later version). 

After migration you can decide to place them into the same solution or not, it is up to you.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 12 of 19

Maxim-CADman77
Advisor
Advisor

I get a bit closer to creating universal Add-In with just one Solution (containing one VB project).

First hint I get from 'Debugging multiple versions in one solution' article by @JelteDeJong (subclause 'Configuring References for Different Frameworks'):

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0-windows'">
    <Reference Include="Autodesk.Inventor.Interop">
        <HintPath>C:\Program Files\Autodesk\Inventor 2025\Bin\Autodesk.Inventor.Interop.dll</HintPath>
        <Private>True</Private>
        <EmbedInteropTypes>False</EmbedInteropTypes>
    </Reference>
    <Reference Include="stdole">
        <HintPath>C:\Program Files\Autodesk\Inventor 2025\Bin\stdole.dll</HintPath>
    </Reference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
    <Reference Include="Autodesk.Inventor.Interop"&gt
        <HintPath>C:\Program Files\Autodesk\Inventor 2024\Bin\Public Assemblies\Autodesk.Inventor.Interop.dll</HintPath>
        <Private>True</Private>
        <EmbedInteropTypes>False</EmbedInteropTypes>
    </Reference>
    <Reference Include="stdole">
        <HintPath>C:\Program Files\Autodesk\Inventor 2024\Bin\stdole.dll</HintPath>
    </Reference>
</ItemGroup>

It generated the DLL twice but to the same Output Folder thus overwrite the files.

 

I then added splitting Output Folder to two subfolders like:

<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0-windows'">
  <OutputPath>..\..\..\..\ProgramData\Autodesk\Inventor Addins\<MyAddinName>\Net\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net48'">
  <OutputPath>..\..\..\..\ProgramData\Autodesk\Inventor Addins\<MyAddinName>\NetFramework\</OutputPath>
</PropertyGroup>

 

Now VS generates two set of files in subfolders BUT Add-In works only for the release the .ADDIN file is set for (Net, Inv2025-2026).

 

To make Add-In work in Inv 2024 (and earlier) I need manually edit .ADDIN file at NetFramework folder (<SupportedSoftwareVersionGreaterThan> and </SupportedSoftwareVersionLessThan>).

 

I wonder which is the best way to automate providing different .ADDIN files for different folders?

Whether it could de achieved with further edit of .VBPROJ file or I need to use Post Build Events?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 13 of 19

Maxim-CADman77
Advisor
Advisor

Dear @MjDeck 

You are right (as usual) - my newer study proved that my AddIn can stay the net48-targeted and work fine with releases 2022-2026 (now I don't understand what was my initial problem), and I'm happy with this fact.

 

But I still see new-release-related issue that I don't understand:
There is a pretty old Add-In threadModeler (by coolOrange) that is officially compatible with Inventor releases up to 2020.

 

In fact launching it in later releases (including 2025) was just a matter of commenting out the <SupportedSoftwareVersionLessThan> line in its .ADDIN file

MaximCADman77_0-1744581796093.png

 

..BUT..

something seems have changed in release 2026 - the AddIn doesn't start (the 'coolOrange' tab not added) in it.

 

Can you make any guessing why it works in 2025 and fails in 2026 (what have changed)?

 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 14 of 19

YuhanZhang
Autodesk
Autodesk

Hi @Maxim-CADman77 ,

 

I tested the addin threadModeler here with Inventor 2026 build, and it works well. If you even can't see the ribbon tab for the addin can you check if the addin is loaded or not from Add-In Manager dialog?



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

Message 15 of 19

Maxim-CADman77
Advisor
Advisor

@YuhanZhang , Thank you - threadModeler was silently refusing to load on my PC until the Inventor 2026 Reset.

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 16 of 19

Maxim-CADman77
Advisor
Advisor

I believe I can't debug NetFramework 4.8 targeted project in Inventor 2025(6), right?

 

When I try I get:

A fatal error has occurred and debugging needs to be terminated. The debugger was configured to use the Desktop CLR (.NET Framework) Managed debugger, but the target process loaded the CoreCLR (.NET Core) runtime. To debug this project, configure it to use the 'Managed (CoreCLR)' debugger.

MaximCADman77_0-1745062369207.png

 

 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 17 of 19

MjDeck
Autodesk
Autodesk

Hi Maxim - you can debug it, but you have to use the Managed (CoreCLR) debugger.
Even though the project was built for .NET Framework 4.8, in Inventor 2025 it will use the CoreCLR runtime.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 18 of 19

Maxim-CADman77
Advisor
Advisor

Dear @MjDeck 
Do you mean that the only way is to manually attach to Inventor.exe process with manual select of  "Net Core.." Code type?

MaximCADman77_0-1745092853179.png

 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 19 of 19

MjDeck
Autodesk
Autodesk

Yes, that's right. You have to tell Visual Studio to use .NET Core, .NET 5+.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes