Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Program works in debug mode but not in release mode

I'm creating a program in visual studio using the fly capture camera libraries. My goal is to build the program into a standalone application. When run in debug mode the program behaves normally, but in release mode I get a 'System.IO.FileNotFoundExeception':

Could not load file or assembly 'FlyCapture2Managed_v140.dll' or one of its dependencies. The specified module could not be found.

So I'm missing a dll file, but why do I only get this error in release mode? How can I properly link the file in visual studios?

like image 489
Jaitnium Avatar asked Jan 24 '26 07:01

Jaitnium


1 Answers

Check uour configuration, you just need to desactivate OptimzeCode.

1-Right click on your Project, click on Properties 2-go to tabItem Build, in section General desactivate Optimize Code.

enter image description here

like image 105
lizarazou Avatar answered Jan 25 '26 19:01

lizarazou



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!