Reputation: 1
I am implementing ClosedXML to export a datatable. When compiling and testing with the source everything was fine. But when I run the .exe on other stations it returns this error:
System.IO.FileLoadException: 'No se puede cargar el archivo o ensamblado 'System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' ni una de sus dependencias. La definición del manifiesto del ensamblado no coincide con la referencia al ensamblado. (Excepción de HRESULT: 0x80131040)'
Excepcion Interna FileLoadException: No se puede cargar el archivo o ensamblado 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' ni una de sus dependencias. La definición del manifiesto del ensamblado no coincide con la referencia al ensamblado. (Excepción de HRESULT: 0x80131040)
ClosedXML installs the System.Memory package. It gives an error within the compilation with version 4.5.4 and with 4.5.5 it does not occur. And it is when it is generated when testing it on other stations and mine in a separate folder
I already reviewed the Nuget documentation about it and there are no problems because it is not really ClosedXML but System.Memory. I already tried uninstalling it and remounting it
Note: I using Imports ClosedXML.Excel
When implementing it from open source in Visual Studio it generates the Excel file without problems but when it is going to be assembled is when it generates the error
Upvotes: 0
Views: 459
Reputation: 1
I had issues with Assembly's failing to load due to not finding the correct assembly versions. It turned out that I was not deploying my application with the (appname).exe.config file that was generated by Visual Studio 2022 (in the bin\ output folder). Once I included that, the Assembly issue went away.
Upvotes: 0