Skip to content
Mohamad EL-Bawab edited this page Aug 30, 2014 · 31 revisions

To setup your development folders, we recommend the following structure: NumXL SDK for Net
Where:

  • numxl-sdk-net folder contains all source files for the .NET SDK Wrapper (i.e. NumXLAPI.dll)
  • output folder contains the executable binaries in NumXL and the SDK.
  • proj folder is where you maintain the source code for your custom application.

New Project

Go to the project folder (e.g. proj), create a new project:

  1. Under Other Languages folder, select Visual Basic or Visual C#, and expand. For this demo, let's select Visual C#.
  2. Select Console Application
  3. .NET Framework 4 (or higher)
  4. Name: TestApp
  5. Location: C:\Work\SDK\proj
  6. Solution Name: TestApp (grayed)
  7. Create Directory for solution: Uncheck New Project wizard summary for NumXL SDK for .Net New Project directory and files

Project References

Before we can start using the APIs, classes and the different types defined in the SDK, we need to add a reference to the .NET wrapper for the SDK (aka NumXLAPI.dll).

  1. In your visual studio:
  2. In solution browser, select your project and expand "references". Visual Studio browser with references
  3. right-click on "references" and select "add reference". Visual Studio browser right-click to add reference
  4. Add Reference pops up, select the Browse Tab
  5. Browse the filesystem to your installation directory, and select "NumXLAPI.dll". Visual Studio add reference by browsing Visual Studio add reference by browsing
  6. Click OK.
  7. Save.
  8. In the solution browser,
  9. Select "NumXLAPI" under references, right-click and select properties. Visual Studio reference properties by right-click
  10. In the properties window, set "Copy Local" to False. Visual Studio reference properties set Copy Local to False
  11. Using the Configuration manager, create a configuration for x86 and/or x64 platforms.
  12. In Solution browser, select your project, right-click and select properties
  13. Select the build tab
  14. Select Configuration to All, and Platform to "x86 or x64"
  15. Set the "Output Path" to your installation directory. Visual Studio reference properties set output directory to installation
  16. Save
  17. Next, add a "using statement" to reference NumXLAPI in each source file. Visual Studio add a reference to NumXLAPI and use the SDK APIs and datatypes

Note: See the examples folder for numerous complete examples.


Common Issues:

Q1. Which Platform should I use?
[Answer] In general, the Windows and the NumXL SDK platform (i.e. 32 or 64-bit) determines the supported platform of your application:

  1. On a 32-bit windows machine, you can only use the 32-bit NumXL SDK. In this case, use x86 (or Any CPU) platform.
  2. On a 64-bit windows machine and 32-bit NumXL SDK, you need to use the x86 platform.
  3. On a 64-bit windows machine and 64-bit NumXL SDK, you can use either x64 (or Any CPU) platform.

Q2. Error: NumXLAPI.dll' must be strong signed in order to be marked as a prerequisite.
[Answer] This is something to do with the assembly cache requiring all assemblies to be strongly signed (so I'ev read). This can be fixed by clicking on "Application Files" in the publish tab, selecting NUMXLAPI and make sure the publish status is set to "include" rather than "prerequisite

Q3. Error: An attempt was made to load a program with an incorrect format.
[Answer] This is a 32/64 bit issue so just set compiler options to all configurations/all platforms/any CPU which fixed it.

Clone this wiki locally