简体   繁体   中英

How to add affdex-native.dll as a reference to Visual Studio 2015?

I follow the introduction of http://developer.affectiva.com/v3/windows/ ,it says the "The .NET assembly depends on the affdex-native.dll and loads it in runtime." but I only can add Affdex.dll but not affdex-native.dll, and my project never work well, the error is "An unhandled exception of type'System.IO.FileNotFoundException' occurred in System.Windows.Forms.dll". Can anyone help me?

Follow the instructions as it is here EXACTLY.

https://github.com/Affectiva/affdexme-win

Download the repo and extract and open in visual studio. You should be able to run this 32 bit version. You need 32 bit version of affectiva SDK. 64bit didnt work for me.

Once you set the path as given in FilePath.cs as given the instructions and build it in visual studio, you should be able to run the application. And yes, you need to put the license file in the

\\affdexme-win-master\\affdexme-win-master\\bin\\Release folder and use the same name in FilePath.cs

Have you tried setting the referenced assembly's "Copy Local" property to true? I had a similar issue and that managed to sort it out. Check in the compiled folder if the file is copied. What helped me in finding out solutions to this kind of issue was to use the dependency walker . I don't know how relevant this is to you in this situation but I just thought it might help next time.

You could right click on the Project csproj -> Add Existing Item -> Browse to the respective "affdex-native.dll" associated with your Platform, and add it.

Then you "Right click" the dll that was just added to your csproj and select "Properties". Set "Copy to Output Directory" to "Copy Always" and set "Build Action" to "None". This should be enough.

Note: You might need to do the same for "opencv_ffmpeg248.dll".

Best regards, Silviu

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