简体   繁体   中英

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?

如果您右键单击引用,选择属性,然后将“复制本地”设置为 True,它将在您发布构建时发布。

Check your configuration, it may well be that you release configuration isn't set to build the project that produces 'FlyCapture2Managed_v140.dll'.

Right-click on your solution, select Configuration Manager, choose Release configuration and confirm the project has the Build column ticked.

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.

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM