Context Isolation in Revit 2026

Context Isolation in Revit 2026

e_ziebarth
Observer Observer
1,951 Views
3 Replies
Message 1 of 4

Context Isolation in Revit 2026

e_ziebarth
Observer
Observer

Dear Revit community,

I am sorry if this is a stupid question but I was trying to use the new Add-in Dependency Isolation feature in Revit 2026 (referred to here: https://www.revitapidocs.com/2026/news). When I set these parameters nothing seems to change. Which further steps do I need to take in order to make it work?

0 Likes
Accepted solutions (1)
1,952 Views
3 Replies
Replies (3)
Message 2 of 4

ricaun
Advisor
Advisor

Unfortunately the Add-in Dependency Isolation does not work like I expected

 

I create a video when Revit 2026 release explain the issue.

 

 

I tested with Revit 2026.1 and still does not isolate my RevitAddin.B from RevitAddin.A.

 

Here is my full test project: https://github.com/ricaun-io/RevitTest.Isolation.Tests

 

 At the moment does not isolate the addin properly, other addin still can find similar dll in a in your isolated context...

 

I never gonna use this feature and I do not advise to used.

 

Ps: In Revit 2026.1 the RevitAddInUtility.dll was fixed.

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes
Message 3 of 4

e_ziebarth
Observer
Observer

Thanks a lot for providing this test project. What you show in your video is exactly the situation I run into.

 

It's unfortunate that the isolation doesn't work properly because that would solve a lot of problems. For now I fear I'll search for another solution. Thanks a lot.

0 Likes
Message 4 of 4

ricaun
Advisor
Advisor
Accepted solution

I had some small hope that this would be fixed in Revit 2026.1 patch, didn't happen.

 

If you want to complain here is the main thread in the Revit Preview feedback.

 

So I guess the easiest option to 'isolate' the plugin would be to ILRepack all the dependencies inside the main plugin dll.


I create a package to help ILRepack all the dependencies in a single dll. I kinda need to create a video about that.

 

Here is the package:

If you add this in your csproj, all the references will be repack inside the main dll. (Build time increases depending on how many dependencies your project has.)

<ItemGroup>
  <PackageReference Include="ricaun.ILRepack" Version="*">
    <PrivateAssets>all</PrivateAssets>
    <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
  </PackageReference>
</ItemGroup>

<PropertyGroup>
  <ILRepackCommandExtra>/allowdup /allowduplicateresources</ILRepackCommandExtra>
</PropertyGroup>

 

The other option would be implement the AssemblyLoadContext yourself, but that add code complexity and only works with .NET Core (Revit 2025+).

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils