06-26-2017 09:16 AM
My Visual Basic program uses some Measurement Studio controls and all works well on my development machine. Having added a Setup Project I get an error message
File 'NationalInstruments.Common.Native.dll' targeting 'AMD64' is not compatible with the project's target platform 'x86'
How do I change it to target a generic "x86"?
Thanks.
06-27-2017 09:26 AM
Hi Indiana_Bill,
What platform is your original project targeting in Visual Studio? For example, are you targeting x64, x86, or AnyCPU?
If you specifically want to target x86, you would need to make sure your references are pointing to the 32-bit versions of the National Instruments assemblies or platform-agnostic versions (AnyCPU). To my knowledge, the assembly you refer to should be platform agnostic.
Where are your references for that assembly pointing? Are they pointing to the Global Assembly Cache, and if so are they pointing to GAC_64?
The following documents might be helpful in understanding the differences.
http://zone.ni.com/reference/en-XX/help/372636F-01/mstudiowebhelp/html/64bitsupport/
http://zone.ni.com/reference/en-XX/help/375857A-01/xml/64bitcore/
As a sanity check, can you target your project to explicitly use the x64 or AnyCPU options and see if the same message appears?
06-27-2017 09:51 AM
The application was intended to target x86. It had a mixture of setting, some "x86" some "Any CPU". I finally found one last setting to change to "x86" and built successfully this morning. I knew it was something of that sort of problem but couldn't find the key setting.
Thank you for your help. I will review the suggested references to improve my understanding.