Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly after deploy

I am developing app, which uses PDFLibNet.dll, everythings works fine on my pc, but when I deploy application and try to use it in another pc, creating PDFWrapper class (from PFDLibNet.dll) throw me an exception: Could not load file or assembly "PDFLibNet.dll" or one of its dependencies.The specified module could not be found.

The same scenario on Win7 and XP

PDFLibNet.dll is stored in the same directory as binary .exe file of my app. Any suggestion how to fix it? I am using .Net4.0, Win7 Thanks!

like image 208
Martin Ch Avatar asked May 25 '26 12:05

Martin Ch


1 Answers

It can be 2 possible reasons:
1. Check if dll was build for x86 or x64 or AnyCPU if you target machine x64 build your dll x64
2. It can be because of MS C++ redistrubute updates! uninstall them and try to start app again. Or you can either install the redistributable on the target machine.

like image 103
Mustafa Ekici Avatar answered May 28 '26 01:05

Mustafa Ekici



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!