Skip to Content
0

Issues Making 64 Bit Add-On

Jun 15, 2017 at 06:50 PM

88

avatar image

I’m currently working on an existing project developed by a former developer to create an add-on for B1. I was able to add the new features the client wanted and compile the add-on as the 32 bit version. However, when I change project to compile as 64 bit and build the add-on, I get this error when I try to import the add-on in B1 “An attempt was made to load a program with an incorrect format”

Has anyone seen this type of error before and if so, would you know how to correct the issue?

Regards,

William

error.png (7.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

ANKIT CHAUHAN
Jun 16, 2017 at 05:07 AM
0

Hi William,

If your SAP Business One Version is 9.0 or higher, you need to make sure that while recompiling your add-on to make it compatible for 64-Bit SAP Business One Client, everything should be in 64- Bit including your SAPbouiCOM and SAPbobsCOM references.

Kind regards,

ANKIT CHAUHAN

SAP SME Support

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Ankit,

I did update the reference to the SAP Com objects to the 64 bit version and then copy them into the dir the add-on is going to be compiled into the 64 bit version. For the project, I ensure I set it to 64 bit CPU

When I make the B1DE project installer, I also ensured I set the CPU you 64 bit

When I build the ARD file, I made sure I set it to 64 bit

Yet when I import the add-on in B1, I still get the same error.

b.png (12.8 kB)
a.png (13.3 kB)
c.png (16.7 kB)
0
Danilo Kasparian Jun 16, 2017 at 12:55 PM
0

Hi Willian,

You will probably need to install SAP and DI API x64 too, then you add these references to your project. As Ankit said, everything need to be on x64 not only your project.

Show 6 Share
10 |10000 characters needed characters left characters exceeded

Hi Danilo,

I do have SAP and DI API x64 installed. If it a 64 bit add-on compiled from another party, those I can get installed on my system. It my own add-on I'm compiling I'm having issues with.

version.png (114.6 kB)
install.png (7.6 kB)
0

How are you creating your installer? Not the .ard the setup.exe, I remember there is also a x64 AddOnInstallAPI.

0

When you informed me of the x64 AddOnInstallAPI, I decided to do a Google search on it. I did lead me to thread https://archive.sap.com/discussions/thread/3624630 which informed how to make a 64 bit add-on with B1DE. I learned by default, B1DE is setup for 32 bit and reference the 32 bit AddOnInstallAPI.dll. Edy Simon reply at timestamp September 24, 2014 at 04:58 AM advise how to update the AddOnInstallAPI.dll for the B1DE installer project. I did apply the code changes and compiled the project. When I import the new compiled add on, I get this error as shown below. I'm wondering if there something else I need to update as well resulting the below error?

new-error.png (6.1 kB)
0

I am sorry, I don`t really remember B1DE, but in this post you mentioned there is a B1DE already compiled.

https://sites.google.com/site/edyssid/home

You could try to use this one... Also as a suggestion, if I were you I would use LightWeight, it is much easier.

0

No worries. I should be able to figure it out soon. At least we worked out one of the issues I had I didn't reference the x64 AddOnInstallAPI

0

Hi William,

Check this link for 64-Bit add-on creation using B1DE.

Create ARD using B1DE

Kind regards,

ANKIT CHAUHAN

SAP SME Support

0