C # plugin error could not load file or assembly

Hello Guys

made a plug-in for exporting data to Excel on my computer a plug-in and a node everything works fine

when starting the plugin on any other computer, this error occurs

Solution exception: Could not load file or assembly “EPPlus, Version = 4.5.3.3, Culture = neutral, PublicKeyToken = ea159fdaa78159a1” or one of their dependencies. Cannot find the specified file.

the plugin has the following libraries
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Text;

using Grasshopper.Kernel;
using Rhino.Geometry;
using Grasshopper.Kernel.Types;
using Grasshopper.Kernel.Data;
using OfficeOpenXml;

image

I installed the EPPlus package in the visual studio 2019

PM>Install-Package EPPlus -Version 4.5.3.3

Please tell me how to deal with such an error and how can I make this package carry along with the plugin and run on other computers?

Hi
try to include the EPPlus.dll assembly in the grasshopper special components folder. Probably at runtime GH is not able to locate it properly.

2 Likes

Thank you very much did not think about it! :slightly_smiling_face: :innocent:
the file next to the plugin laid everything worked

EPPlus.dll
EPPlus.xml

1 Like

in continuation of the question, please tell me whether it is possible to somehow put files (EPPlus.dll EPPlus.xml) inside the grasshopper plug-in file ***.gha? :grinning:
so that they are not constantly transferred with the plugin file? :face_with_monocle:

or is it technically not possible?

Hi Alex,

to my knowledge it is not possible because that is in external assembly that does not exist in other peoples computer. If you take a look, there are also lots of Grasshopper plugins that have to ship with external assemblies that are added in the special component folders so that at run-time they can be found by the computer.

1 Like

Thank you very much for the answer! :grinning: