-
Notifications
You must be signed in to change notification settings - Fork 301
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
latest release won't run #210
Comments
you have installed plugins using the Microsoft.Extensions.Options.dll ? microsoft updated it recently, and it became incompatible with earlier versions. RevitLookup used the latest the easiest way is to copy this library from RevitLookup to another plugin that depends on it. or if this is your plugin, update the version to 8.0.2. is there a problem with RevitLookup 2024 and older? |
Yes, that'll be it. I'm using Microsoft.Extensions.Hosting v7. If you have to use v7 in 2025 is there a benefit in using v8 in earlier Revit versions? |
In older versions I keep 8.0 to ensure compatibility with existing plugins, and its the latest stable version with a lot of optimizations. Autodesk didn't have time to update the dependency to the latest version in revit 25, they promised to fix it in the next patch/hotfix |
You can support different versions like this. <PackageReference Include="Microsoft.Extensions.Hosting" Version="7.*" Condition="$(RevitVersion) == '2025'"/>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.*" Condition="$(RevitVersion) != '' And $(RevitVersion) < '2025'"/> Maybe it's a temporary measure until the hotfix comes out |
Maybe. There's other important 3rd party plugins I use that currently depend on hosting v7. I'll have to see how that works its way through. |
The issue is not related to the |
Nope, the problem is with the microsoft dependency bundle. The fact that the exception occurs with Serilog is just a coincidence that it is the first to call conflicting methods. But RevitLookup has been using version 8 dependencies for a long time, since the release of .Net 8. I had to downgrade to version 7 just for Revit 2025 to avoid conflicts. 2024 and older still use 8 |
I'm always in favour of keeping dependency versions up to date, and not using outdated ones |
@Nice3point I hear that .NET 8 easier to resolve assembly conflict |
@chuongmep yeh, net 8 has AssemblyLoadContext, and dependency resolving works completely differently there compared to the .net framework |
Looks like the interface
Me too, but inside Revit the rules change. Especially if Revit decides to use the same library with an old version. That's the main reason I usually avoid to use well know libraries inside Revit, to make sure the plugin gonna run without any conflict with Revit or other plugins. |
I agree, that's why I first look to see if the library bundled in Revit. If so, I use Condition to set a fixed version. |
so just to clarify.....if update Microsoft.Extension.DependencyInjection in any addins I have control over to 8., in Revit 2024 and earlier, will that prevent me from using them alongside any other addins that use Microsoft.Extension.DependencyInjection 7.? |
Not sure, if they only use Microsoft.Extension.DependencyInjection then maybe everything will work. But if Hosting, I can't give any guarantees. I still recommend you to update your projects to the current version 8 |
I found a way!
Here is the issue for that problem: #246 |
I'm getting a missing method exception on the latest build https://github.com/jeremytammik/RevitLookup/releases/tag/2025.0.0
The text was updated successfully, but these errors were encountered: