AnsweredAssumed Answered

Installing AFSDK Code as a service

Question asked by natdavidson on Jul 22, 2017
Latest reply on Aug 4, 2017 by natdavidson

I have a some AFSDK code that is looking at a folder location in a timed cycle, when it finds a file, it parses it and updates AF attributes for multiple different elements, and this I want to run as a service. I've created windows services in the past, i'm no expert though. With the bit of code i have now, I go through the normal process of making an installer for the service code, go to run the resulting installer and get this error:


"Error 1001. Exception occurred while initializing the installation: System.BadImageFormatException: Could not load file or assembly 'file:///C:\Program Files\[company]\[projectName]\[projectName].exe' or one of its dependencies. An attempt was made to load a program with an incorrect format."


I've set the setup project to prefer x64 bitness, and also anywhere else i've set it to compile for x64. Could the reason i'm getting this error be that the AFSDK is only for 32-bit? I get an error about not being able to use 32-bit when my project was set for 32 bit (the default).


I can provide sanitized code if needed, just wondering if i'm doing something wrong with 64 bit vs. 32 bit.