Revit API error shown in journal files

Revit API error shown in journal files

NonicaTeam
Enthusiast Enthusiast
1,300 Views
3 Replies
Message 1 of 4

Revit API error shown in journal files

NonicaTeam
Enthusiast
Enthusiast

Hi, 

When using a different version that the loaded dll when creating a Revit AddIn, despite it AddIn does its functionality perfectly, in the journal file record it is displayed:

: Assembly version conflict in some references in NonicaPro.dll assembly
'Addin's module RevitAPI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0
'Addin's module RevitAPIUI of version 22.0.0.0 conflicts with same preloaded module of version 21.0.0.0
'Addin's module RestSharp of version 106.11.7.0 conflicts with same preloaded module of version 105.2.3.0
'Addin's module DynamoCore of version 2.12.0.5650 conflicts with same preloaded module of version 2.6.1.8786
'Addin's module DynamoUtilities of version 2.12.0.5650 conflicts with same preloaded module of version 2.6.1.8786
'Addin's module AdWindows of version 3.1.7.0 conflicts with same preloaded module of version 3.0.4.0
'Addin's module RevitNodes of version 2.3.0.8352 conflicts with same preloaded module of version 2.6.1.8850
'Addin's module DynamoRevitDS of version 2.12.0.5740 conflicts with same preloaded module of version 2.6.1.8850
'Addin's module ProtoCore of version 2.11.1.4675 conflicts with same preloaded module of version 2.6.1.8786
'Addin's module RevitServices of version 2.12.0.5740 conflicts with same preloaded module of version 2.6.1.8850

Is there a way to fix such an error? 

Thanks

0 Likes
1,301 Views
3 Replies
Replies (3)
Message 2 of 4

jeremy_tammik
Alumni
Alumni

This looks like a design error in the NonicaPro.dll assembly. Apparently, it is locked to a specific version of the Revit API assemblies, forcing the conflict. I do not know how you can achieve this problem. I have never had it myself. Maybe it will help if you ensure that the 'Copy Local' flag is set to 'false' on the Revit API assembly DLL references:

 

http://thebuildingcoder.typepad.com/blog/2011/08/set-copy-local-to-false.html

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
Message 3 of 4

NonicaTeam
Enthusiast
Enthusiast

Thanks @jeremy_tammik for your fast response! Indeed, it looks like a mismatch between the version used for development and the version used in the target machine. We checked Copy Local and all is set to false. Referencing all RevitAPI.dll to avoid conflict for instance does not make much sense.

0 Likes
Message 4 of 4

NonicaTeam
Enthusiast
Enthusiast

Hey,

Apparently, it is a known issue?https://knowledge.autodesk.com/support/revit/troubleshooting/caas/sfdcarticles/sfdcarticles/API-Erro...

It does only happen in Revit 2021 though. In revit 2020, no error is recorded in the journals. However in all versions, the app works perfectly.🤔 We would like to record the journal well to make use of that information and it is not possible with the error.

 

0 Likes