-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency conflict with third-party plugins #269
Comments
DependenciesReportThis tool designed for static analysis of dependency conflicts between plugins. Displays a conflict summary and optionally updates dependencies to the latest version. It works without starting Revit. Download:
Source code: https://github.com/jeremytammik/RevitLookup/tree/dev/tools/source/DependenciesReport If you have problems with running RevitLookup, please send reports: Be careful when running the upgrade, dependencies that are not backwards compatible may break older plugins: AssembliesReportThis tool designed for Revit, creates a report on the dependencies used. Aimed at helping to trace the loading of dependencies. Download:
Source code: https://github.com/jeremytammik/RevitLookup/tree/dev/tools/source/AssembliesReport
|
@acco-jpitts at the moment Revit Toolkit is the only one bottleneck that can cause failures in Revit 2025, as it is this library that provides isolation. I will look into how to get around this, thanks for the clarification |
@Nice3point Please have a look, there have conflict between Python node in Dynamo and RevitLookup
|
Native add-in isolation planned for feature Revit updates |
Interesting! Where did you get this file? Edited: |
I was experimenting with In the end only Looks better and easier than the Isolation approach all the dependencies are inside the main Here is a image inside Revit 2025, with only I was messing with bundle so here is the version with And the repo: https://github.com/ricaun/RevitLookup/tree/refs/heads/dev-bundle-ilrepack I'm using my custom Using this code inside the <ItemGroup>
<PackageReference Include="ricaun.ILRepack" Version="1.0.0-rc" />
<ILRepackIgnoreReferences Include="RevitLookup.UI.dll" />
</ItemGroup>
<PropertyGroup>
<ILRepackImportance>High</ILRepackImportance>
<ILRepackCommandImportance>High</ILRepackCommandImportance>
<ILRepackCommandExtra>/union /allowduplicateresources</ILRepackCommandExtra>
</PropertyGroup> This would fix once for all the RevitLookup dependency conflict with third-party plugins, and works with all Revit version. |
I don't really feel like this would make sense in Revit 2026 with a native isolation. What do you think? |
I guess you could not use |
Probably they will release it with insufficient quality, given the strict release policy they will not finish the fixes with .addin, and we will need to look for workarounds. Just in case we can use the repack, for now let's wait for April and new news |
So, Il-Repack is not compatible with the current code base. Blocked by: gluck/il-repack#387 |
You don't need to repack the UI, because you already copy the whole project and rebuild with a different assembly name. I don't know exactly how the new code base is working but only the references that is not start with RevitLookup should be repacked. |
This will not work, now RevitLookup consists of more than one file. Also RevitLookup.Ui.Framework contains WPF markup, which will not allow to merge dlls so easily because of the issue above @ricaun |
Interesting a lot of projects, maybe the way would be to have another project just to repack the references, like Gonna try that when I have some free time. |
A separate project is a bad way to go, the current implementation should not depend on whether Repack is used or not. Still it is an additional option, and besides we will not use it for Revit 2026+ in favor of Revit built-in AssemblyLoadContext. So, if you dynamically link to the project after the repack, maybe it will be fine, but it's a very complex approach, you can try. I think it's best to wait for the Il-Repack patch, as it will solve the current problem completely. The whole problem is that the Package URL doesn't updated in the Ui.Framework, but we cannot exclude it from the repack, because it refers to CommunityToolkit and Microsoft.Logging. |
Now I get it! You want to repack the whole plugin to a single dll. The Package URL make sense in this case, and is better solution if that works by default with no extra steps. I did a quick test with the gluck/il-repack#390 And works really great, only need to change the hardcoded namespace to fix the theme change. //internal static string LibraryNamespace = "revitlookup.ui;";
internal static string LibraryNamespace { get; } = typeof(ApplicationThemeManager).Assembly.GetName().Name; |
RevitLookup.UI can be left as a separate dll, like LookupEngine, they have no dependencies. I mean RevitLookup.UI.Framework, it contains Pack URIs like this: https://github.com/jeremytammik/RevitLookup/blob/dev/source/RevitLookup.UI.Framework/Markup/Menu/MenusDictionary.cs#L31 gluck/il-repack#390 2 days ago, so it will be included in the next patch 🙂 |
My idea was to not include the any UI dll in the repack. This new patch looks really promising. Let's wait for the release 🙂 |
If you notice any issues, let me know. The new version should work several times faster 🙂 Release in April |
I noticed the Theme is not updating the current window, is similar like this issue: #194 Don't know if is because of the Repack version, but I Repack the |
Is the problem only with repacking, or without it doesn't switch either? |
I rebuild without the repack loaded inside Revit and works, sorry about that. |
Ran into this the other day where lookup appears to be using a little bit older version than the latest that was being used in a project. Only happened in R24, but seems to be similar to this issue. If I shifted the load order, then the error message was thrown by the other add-in and not Lookup. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. System.MissingMethodException: Method not found: 'Void Nice3point.Revit.Extensions.RibbonExtensions.SetImage(Autodesk.Revit.UI.RibbonButton, System.String)'. |
Did you use ILRepack? |
@ricaun yes, ILRepack enabled for RevitLookup 2025 and older https://github.com/jeremytammik/RevitLookup/blob/dev/Directory.Packages.props#L52 |
Nice. This probably is irrelevant after the repack.
Could be possible to release a .bundle.zip without any installation with the releases in the GitHub? |
Why do you need a bundle, what is the purpose? A new issue with the proposal is also welcome @ricaun
Maybe) I'll check |
To install all Revit versions at the same time, is more convenient to install/update a simple folder. |
I was thinking about WinGet, to install all versions from console |
2026.0.0-preview.2.250222 seems to be playing nicely with Revit 2025 and older versions of Revit when multiple plugins are installed (when previously I'd have some issues). |
RevitLookup uses third-party dependencies produced by other developers. User plugins may also use these dependencies, but of different versions, which will cause a conflict and an exception on startup. We have no control over this process, and we cannot prevent other developers from using third-party libraries.
Why are you getting this error in RevitLookup and not in another plugin? Because plugins are loaded in alphabetical order, and the 'R' is near the end, so that's where you get the exception and RevitLookup not working. Unfortunately, the plugin that is loaded first forces Revit to use it dependencies for all plugins. And if it's outdated, RevitLookup, which uses the newest one, will simply be incompatible, if everything was in reverse order this could have been avoided.
At the moment there are some ways, disable conflicting plugins:
_RevitLookup.addin
. Add-ins are loaded in alphabetic order.Remember though, you can fix RevitLookup in this way, but there is a chance that conflicting plugins may not work.
RevitLookup dependencies list:
https://github.com/jeremytammik/RevitLookup/blob/dev/source/RevitLookup/RevitLookup.csproj#L45-L71
The text was updated successfully, but these errors were encountered: