08-21-2014 10:29 AM - edited 08-21-2014 10:31 AM
I am trying to deploy a CVI app using a .NET assembly, using the 4.0 framework.
Here are my project artifacts:
CVIApp.exe |-- use --> A.dll ( C++/CLI ) |-- use --> B.dll (Native C++)
What is working:
-> I have successfully generated the wrapper & instrument from the A.dll, using the "Create .NET Controller" tool.
As post build event I just xcopy the A.dll & B.dll in the CVIApp.exe folder. So the dlls are in the same folder as the executable.
I can debug in the developement machine.
-> I created a distribution setup to install the NI dependancies in a target machine ( with Visual Studio 2012 installed ) . Then I can use my app in this machine by creating a folder with the .exe (in debug) & dlls & other GUI resources. (*)
What is not working:
-> Not working in Release Mode. The application behaves as if it fails invoking the unctions of my A.dll.
-> Not working using the same deployement method as (*), in a machine that does not have Visual Studio 2012 installed. The CDotNetLoadAssembly( ... ) function returns -6579.
May someone help me on this?
Regards,
Julien
08-22-2014 04:04 AM
Hello,
To execute your dll in a PC without Visual Studio installed, you need to install the run time of Visual Studio in the host PC before.
It looks possible to download it:
http://www.microsoft.com/fr-fr/download/details.aspx?id=30679
I advise you to read these documents which explain how to generate an installer. With this tool, you will be able to add all the file necessary to execute your application :
http://www.ni.com/white-paper/5987/en/
http://zone.ni.com/reference/en-XX/help/370051Y-01/cvi/usermanual/distributionoverview/
Best Regards,