Closed AmeerMansour closed 3 months ago
I found the issue that revit uses an older version but shouldn't the assembly resolver handle that? Microsoft.Extensions.Logging these are the modules that loaded in the environment
What version of Revit are you using, 2025 or older?
2024
@AmeerMansour the problem and solutions are described here https://github.com/jeremytammik/RevitLookup/issues/269 you have a plugin with outdated dependencies check the installed plugins to understand which one uses Serilog.dll
the problem is not in 3rd party the problem is revit itself uses C:\Program Files\Autodesk\Revit 2024\Microsoft.Extensions.Logging.dll version 2.02.0.18315 which doesn't have application insights extension ! so I have to downgrade my Microsoft.Extensions.Logging to the same version .
if you have revit 2025 installed can you check if they are using Microsoft.Extensions.Logging version 2.02.0.18315 as well ? as they are using it since 2020
Yes, indeed older versions of Revit include version 2.2. You can downgrade the Nuget package version for them. The 2025 version includes version 7, but it doesn't matter because the 2025 version has enabled dependency isolation in the Toolkit and you can use Microsoft.Extensions.Logging version 8 with no problem.
thanks ! it is really awful to be forced to use Microsoft.Extensions.Hosting v2 for older revit versions. you may close this issue if you want
I am trying to add application insights to the host and I get this error not sure what is the issue
I just added Microsoft.Extensions.Logging.ApplicationInsights package and trying to use it