Autodesk Inventor 2027: Improved Dependency Isolation for .NET Add-ins

Managing dependencies has always been one of the key challenges in developing .NET add-ins for Autodesk Inventor. As ecosystems grow and multiple add-ins coexist within the same environment, conflicts often arise when different add-ins depend on different versions of the same third-party libraries.

Autodesk Inventor 2027 introduces a powerful enhancement to address this challenge through the UseInventorAssemblyContext tag. This new capability gives developers greater control over how assemblies are loaded and resolved at runtime, enabling improved dependency isolation and more stable add-in behavior.

Understanding Assembly Load Context in .NET

In .NET, assemblies are loaded into what is known as an Assembly Load Context (ALC). This context determines how dependencies are resolved during runtime.

Traditionally, Autodesk Inventor loads all .NET add-ins into Inventor’s default assembly load context, meaning:

  • All add-ins share a common dependency resolution environment
  • A single version of a library is typically used across all add-ins
  • Version conflicts may occur when different add-ins require different dependency versions

While this model works for most basic scenarios, it can become problematic in complex environments with multiple third-party or in-house add-ins.

Introducing UseInventorAssemblyContext in Inventor 2027

To improve flexibility and control, Inventor 2027 introduces the UseInventorAssemblyContext configuration in the add-in manifest.

This setting allows developers to choose how their add-in should load dependencies:

  • Use Inventor’s default shared assembly context
  • Or use a dedicated isolated assembly context for the add-in

Option 1: Using Inventor’s Default Assembly Context

<UseInventorAssemblyContext>1</UseInventorAssemblyContext>

When this option is enabled:

  • The add-in is loaded into Inventor’s shared default assembly context
  • Dependencies are resolved from Inventor’s existing runtime environment
  • All add-ins share the same loaded versions of assemblies

When to use this mode

  • When dependency isolation is not required
  • When relying heavily on Inventor-provided assemblies
  • When add-ins are designed to share common dependencies

Option 2: Using a Dedicated Assembly Load Context (Isolated Mode)

<UseInventorAssemblyContext>0</UseInventorAssemblyContext>

When this option is enabled, Inventor 2027 enables a more isolated loading approach:

  • The add-in is loaded into its own Assembly Load Context
  • Dependencies are first resolved from the add-in’s local folder
  • If not found locally, Inventor searches the <Bin> folder

This model provides stronger isolation between add-ins and reduces dependency conflicts.

Important Behavior Notes

  • If an add-in binary is placed inside Inventor’s <Bin> folder, the isolated context setting is ignored, and the add-in is loaded into Inventor’s default assembly context
  • In isolated mode, dependencies are first resolved from the add-in directory
  • If missing, Inventor falls back to assemblies in the <Bin> folder
  • Dependencies loaded in multiple contexts may result in slightly increased memory usage due to duplication

Real-World Dependency Compatibility Benefits

One of the most important improvements introduced by this feature is better handling of third-party library compatibility.

For example, consider a scenario involving DevExpress 25.2:

  • An add-in built for Inventor 2026 uses DevExpress 25.2
  • Inventor 2027 or other add-ins may use a different version

With UseInventorAssemblyContext = 0, the add-in can:

  • Ship and load its own compatible version of DevExpress
  • Avoid dependency conflicts with Inventor or other add-ins
  • Maintain stability across Inventor upgrades

If a dependency is not provided by the add-in, Inventor will automatically attempt to resolve it from the <Bin> folder.

Similarly, in cases involving libraries like NLog, this approach allows add-ins to independently manage dependencies without being forced to upgrade in sync with Inventor updates.

Key Benefits of UseInventorAssemblyContext

  • Improved dependency isolation between add-ins
  • Reduced version conflicts in shared environments
  • Greater control over third-party library usage
  • Easier management of complex deployment scenarios
  • Improved stability during Inventor upgrades

Best Practices

  • Avoid placing add-in binaries inside Inventor’s <Bin> folder when using isolated context
  • Package required dependencies within the add-in directory whenever isolation is needed
  • Be mindful of potential memory duplication when the same dependency is loaded in multiple contexts
  • Test add-ins thoroughly in multi-add-in environments

Conclusion

The UseInventorAssemblyContext enhancement in Autodesk Inventor 2027 marks a significant step forward in .NET add-in architecture. By allowing developers to choose between shared and isolated assembly loading models, Inventor now provides greater flexibility, improved stability, and better dependency management.

Whether using the default shared context or opting for full isolation, developers can now design add-ins that are more resilient, modular, and compatible with evolving Inventor environments.


Comments

One response to “Autodesk Inventor 2027: Improved Dependency Isolation for .NET Add-ins”

  1. […] Autodesk Inventor 2027: Improved Dependency Isolation for .NET Add-ins […]

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading