Automapper version, Rhino inside in Revit 2025

Automapper version, Rhino inside in Revit 2025

jaroslav.kopecky
Contributor Contributor
71 Views
1 Reply
Message 1 of 2

Automapper version, Rhino inside in Revit 2025

jaroslav.kopecky
Contributor
Contributor

Hello,
I developed Grasshopper plugin for Rhino 8 and using automapper.dll which is working fine in the regular GH environment.

 

In Revit 2025 within the “Rhino inside Revit” environment it doesn't work properly.

 

it seems issue is caused  by that Revit already uses the Automapper (however Version 10). This is quite an old version of the Automapper and actually dedicated to .NET 4.8 while Rhino 8 (8.21) is dedicated for .NET 8 (where Automapper v10 can't be used probably, which is a bit of a paradox situation).

 

Therefor the question: 
Is there any chance that the version of the Automapper used for Revit (2025) will be updated?
(e.g. version 13 or 14 would be great)

0 Likes
72 Views
1 Reply
Reply (1)
Message 2 of 2

ricaun
Advisor
Advisor

@jaroslav.kopecky wrote:

Hello,
I developed Grasshopper plugin for Rhino 8 and using automapper.dll which is working fine in the regular GH environment.

 

In Revit 2025 within the “Rhino inside Revit” environment it doesn't work properly.

 

it seems issue is caused  by that Revit already uses the Automapper (however Version 10). This is quite an old version of the Automapper and actually dedicated to .NET 4.8 while Rhino 8 (8.21) is dedicated for .NET 8 (where Automapper v10 can't be used probably, which is a bit of a paradox situation).

 


That's a classic dependency conflict 😗

Usually Revit never updates dependency dll between parches like, 2025.1, 2025.2, etc. The version always stays the same, so if your plugin uses the same version in Revit 2025, does not matter what subversion the Revit is the Automapper should work like intended.

 

There some approaches you could make to "fix" the problem. 

  • Use the same version as Revit uses (Easy, but sometimes you need a feature in the newer version so this does not fit.)
  • Create some dependency isolation in the plugin to load your Automapper version. (This makes the code a little complex, not advise.)
  • ILRepack the dependency inside the plugin or in a different assembly (like Grasshopper.Automapper.dll) this would prevent you plugin to reference the existent Automapper inside Revit.

 

ILRepack is probably is the best option if you really need to use a specific Automapper version.

 

I have a package that I create just to ILRepack all dependencies in some csproj inside the main dll.

 


@jaroslav.kopecky wrote:

Therefor the question: 
Is there any chance that the version of the Automapper used for Revit (2025) will be updated?
(e.g. version 13 or 14 would be great)


Autodesk never gonna update the package, Revit 2026 still Automapper version 10, maybe in the next Revit Release (probably Revit 2027).

 

 

 

Luiz Henrique Cassettari

ricaun.com - Revit API Developer

AppLoader EasyConduit WireInConduit ConduitMaterial CircuitName ElectricalUtils

0 Likes