1

What is the error in C# Visual Web Part Solution?

enter image description here

System.IO.FileNotFoundException: 'Could not load file or assembly 'EPPlus, Version=4.0.5.0, Culture=neutral, PublicKeyToken=ea159fdaa78159a1' or one of its dependencies. The system cannot find the file specified.'

we have very secured environment here so that's why we don't have internet access to add DLL through NuGet Package . we have the downloaded version EPPlus DLL and we are adding into the solution. once we are compiling the solution there is no exception but when we are running the application its showing 'Could not load file or assembly'

  • Have you tried cleaning the solution and restoring nuget packages? If this error persists, try deleting your nuget folder and download packages again. – virouz98 Feb 21 '22 at 12:22
  • we have very secured environment here so that's why we don't have internet access to add DLL through NuGet Package . we have the downloaded version EPPlus DLL and we are adding into the solution. once we are compiling the solution there is no exception but when we are running the application its showing 'Could not load file or assembly'. – Mohammed Fazil Feb 22 '22 at 08:41
  • Please add to the question that you cannot use NuGet. – Jiale Xue - MSFT Feb 22 '22 at 09:50

1 Answers1

0

Caught in Exactly the Same Problem! EPPlus Has some dependency on other DLLs!

Microsoft.IO.RecyclableMemoryStream  
System.Numerics.Vectors  
System.Memory  
System.Runtime.CompilerServices.Unsafe

And their could be other internal dependency. Since you cannot have internet access, you have to update/replace the bin folder taking from the development environment! Adding reference manually might also be required!

Hope it will work!

Alternatively you can register dll to GAC!