So I've just made my first C# program on Visual Studio. I then copied everything from the release folder (including 1 .exe file, dll files, 1 config file and 1 pdb file) then sent it to another computer. The problem here is that the exe file works fine on my computer, but on the others they crash when it run the first command that requires the dll file, and on the error message that I catch it says that problem is on line xx of "my computer's path to the file", even though it's running on the other's.
Source code of where the crash happens:
Console.WriteLine("Enter file path (Example: C:\\Benchmarking.xlsx)");
string fileName = Console.ReadLine();
FileInfo xlFile = new FileInfo(@fileName);
ExcelPackage package = new ExcelPackage(xlFile);
Error: System.NullReferenceException:Object reference not set to an instance of an object.
This is using EPPLUS to read excel files