You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an application that exports Excel files and is an addin to another application (Autodesk Revit is the parent application). I am currently referencing EPPlus 6.2.19 and all is working well. When I upgrade to EPPlus 7.1.2 I start getting errors. When I call the line using (var ep = new ExcelPackage(fileInfo)) I get this error:
Could not load file or assembly 'Microsoft.Extensions.Configuration.FileExtensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (0x80131621)
I have looked in the compile directory and that file exists (it is version 8.0.23). I also have an assembly resolve handler that should handle loading things from the same directory if necessary and that function never gets called for this dll. I get no compilation errors and no other code changed (we have a fairly simple implementation). Looking through my packages tree, this is a dependency of Microsoft.Extensions.Configuration.Json which is a dependency of EPPlus. When I roll back to 6.2.19 it references this same package but version 7.0 of it and all seems to work.
The text was updated successfully, but these errors were encountered:
Did some more experimentation between versions and this happened at version 7.0.3. I can use 7.0.2 just fine but when I move up to 7.0.3 it starts throwing the exception. I also noticed that this is when the package specifically starts targeting .NET 8.0 (which is what Revit 2025 uses hence we do too). It seems like possibly something is off in the 8.0 support?
Ok so after experimenting more it may be something in the way that Revit is loading this. I figured out that my unit tests that run as their own process are passing and exporting successfully in the newer versions as well, even though inside Revit it's not working. I need to delve into it further to see if there is anything else in the unit tests that would cause it to work when the addin application does not. I've also asked Autodesk about this to see if they know why it would be throwing the error. I will see if I can create a reproducible example outside of Revit and get back to you.
EPPlus usage
Commercial use (I have a commercial license)
Environment
Windows 11
Epplus version
7.1.2
Spreadsheet application
Excel
Description
I have an application that exports Excel files and is an addin to another application (Autodesk Revit is the parent application). I am currently referencing EPPlus 6.2.19 and all is working well. When I upgrade to EPPlus 7.1.2 I start getting errors. When I call the line
using (var ep = new ExcelPackage(fileInfo))
I get this error:Could not load file or assembly 'Microsoft.Extensions.Configuration.FileExtensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. Could not find or load a specific file. (0x80131621)
I have looked in the compile directory and that file exists (it is version 8.0.23). I also have an assembly resolve handler that should handle loading things from the same directory if necessary and that function never gets called for this dll. I get no compilation errors and no other code changed (we have a fairly simple implementation). Looking through my packages tree, this is a dependency of
Microsoft.Extensions.Configuration.Json
which is a dependency ofEPPlus
. When I roll back to 6.2.19 it references this same package but version 7.0 of it and all seems to work.The text was updated successfully, but these errors were encountered: