Autodesk Inventor, working with .NET Framework, previously allowed add-ins to use NuGet package/assembly versions that differed from those bundled with Inventor. However, with Autodesk Inventor 2025-2026 and the framework upgrade to .NET 8, this no longer worked out of the box and caused version conflicts. Autodesk recently released Inventor 2027, using .NET 10, with built-in assembly isolation to address this.
This article shows how to use that built-in isolation, using AssemblyLoadContext, to load an add-in and its dependencies into a separate container and avoid version clashes
A full sample application is available on GitHub. This repo combines the workflows for Inventor 2023-2024 (.NET Framework 4.8), Inventor 2025–2026 (.NET 8), and Inventor 2027 (.NET 10 with built-in isolation)
What is AssemblyLoadContext?
- It's the runtime's provider for locating and loading dependencies. Whenever a dependency is loaded, an AssemblyLoadContext instance is invoked to locate it.
- AssemblyLoadContext provides a service of locating, loading, and caching managed assemblies and other dependencies.
- To support dynamic code loading and unloading, it creates an isolated context for loading code and its dependencies in their own AssemblyLoadContext instance.
How to update the add-in?
Update Addin (.addin) File
- Add the
<UseInventorAssemblyContext>property set to0(zero).
<?xml version="1.0" encoding="utf-8"?>
<Addin Type="Standard">
<ClassId>{YOUR-GUID-HERE}</ClassId>
<ClientId>{YOUR-GUID-HERE}</ClientId>
<DisplayName>IsolatedInventorAddin</DisplayName>
<Description>IsolatedInventorAddin</Description>
<Assembly>IsolatedInventorAddin.dll</Assembly>
<!--Created for Autodesk Inventor 2027+, version 31.0-->
<SupportedSoftwareVersionGreaterThan>30..</SupportedSoftwareVersionGreaterThan>
<LoadOnStartUp>1</LoadOnStartUp>
<Hidden>0</Hidden>
<UseInventorAssemblyContext>0</UseInventorAssemblyContext>
</Addin>
Notes
- The
<UseInventorAssemblyContext>property is backwards compatible, as it is ignored and does not break when included in earlier Inventor versions. - With the change to
<Addin Type="Plugin">, this add-in format is compatible and works as anAppBundlewith the Automation API.
References
- TylerWarner.dev Blog - Isolated Autodesk Addins Series
- Microsoft Learn - System.Runtime.Loader.AssemblyLoadContext
- GitHub - dotnet - AssemblyLoadContext.md
- Autodesk Inventor Documentation - Creating An Inventor Add-In
- TestHeadless
