I have a 32-bit dll which works on Windows 10. Now I need to build a 64-bit version of it which works on Microsoft 365. The code is written in C#.
For the current 32-bit dll, I do the following to build a dll and then xll.
- Find the dependencies by typing the following in Command Prompt: mvn -U process-resources
- In Visual Studio 2017, set Application / Build / Debug as in the following and build the solution:
- After a successful build in Step 2, rebuild to create xll with the following Build Events setting:
After the successful rebuild in Step 3, an xll file is created and it can be loaded from Excel 2016 on Windows 10 machines.
Now, I would like to create a 64-bit version of this (xll) that would work on Microsoft 365 machines. I have searched on the web and talked with my colleagues and they say that setting Platform to "Any CPU" will ensure the generated xll work in both 32-bit / 64-bit Excel. However, when I try to load the generated xll from Microsoft 365 Excel, it fails to be loaded. Would somebody kindly advise how I can make an xll that would work on Microsoft 365?
Attempt to build targeting x64 (added after jimcilhinney's suggestion)
I tried a build targeting x64. The build and rebuild were successful but either of Excel 2016 on Windows 10 nor 64-bit Excel on Microsoft 365 was not able to load the generated xll. Here's the steps I tried.
- Find the dependencies by typing the following in Command Prompt (same as above): mvn -U process-resources
- Set target to x64 from Configuration Manager:
Application (same as the above Application screenshot)
- Same as Step 3 in the above