Basic setup for developing GX in .net

edited May 2023 in Oasis montaj

A few questions as I am trying to get going developing in .net:
- Is there an updated documentation? I have a GXDeveloperHelp.chm file that's pretty outdated.
- How do I set up the templates to be able to use them (SimpleGX, AdvancedGX, WizardGX)? Do I need to copy the files somewhere?



  • JosephCaluag1
    JosephCaluag1 Posts: 44 Calcite Rank Badge
    edited July 2015

    You can find the 8.4 GX Developer Documentation here:

    For Visual Studio 2013, download the following files and copy them to C:\Users\[username]\My Documents\Visual Studio 2013\Templates\ItemTemplates\Visual C#\Geosoft. Keep the files zipped.

    For Visual Studio 2012 and lower, you should be able to double click on the GeosoftTemplates.vsi file in the [Installation_Folder]\gxnet\src\Templates folder.
  • JohnPaine
    Hi Joseph,

    I'm still struggling with how to build a function gxnet dll in c#.

    I found the above message and have tried installing the templates, but having no luck with this either.

    When installed for VS2015 the adding a Simple GX item to an existing C# project it comes up with a heap of missing namespace errors. Fortunately this was easily fixed by first adding the missing references to the projret before adding the new item.

    With that problem fixed, the new simple gx item reports two errors:

    Error CS0246 The type or namespace name 'TranslationAttribute' could not be found (are you missing a using directive or an assembly reference?)

    Error CS0246 The type or namespace name 'Translation' could not be found (are you missing a using directive or an assembly reference?)

    These errors are eliminated if I comment out the lines

    [Translation("core", "GX/Sample")]

    With that problem removed, I then found that I could build the simple HeeloWorld dll and run it from Oasis.

    This was a vast improvement and I thought that I now had a solid basis on which to do something useful, but when I add toolbox components to the base form, they simply don't get displayed when the form is loaded. I've tried working through the designer code to try to figure out why, but haven't been able to work it out yet.

    Best regards

  • JosephCaluag1
    Hi John,

    Which version of GX Developer are you using?

  • JohnPaine
    Hi Joseph,

    I am using VS2015, and the Gx Developer version is:

    GX Developer Toolkit 8.5.1 75654 1468 setup 2015.12.01

    and Oasis version:

    Oasis montaj 8.2 53254 setup 2014.05.05

    But I think that have just solved the problem with the controls not displaying.

    For my testing I was renaming the created dll after each build, removing the gx test menu item, editing the omn file to point to the new dll name, loading the omn file and then clicking on the (edited) menu item to test the new dll. However it appears that this process points to the old dll (which is still loaded in memory) rather than the new dll even though the omn points to the new dll file name. If I close Oasis and reopen it, the menu item then points to the new dll file and things work as expected. This is an extremely clumsy development process, but it doesn't seem like there is any simple way for me to unload the dll from Oasis.

    For reference, the process I use to create the dll is as follows:

    1. Start VS2010
    2. Create a new class library eg Gxtest
    3. Change platform target to x86
    4. Add references to and System.drawing
    5. Add references to geoengine.core.gxnet, geosoft.desktop.gxnet and geosoft.gx.controls
    6. Add new item using simple Geosoft.Net GX
    7. Comment out the Translation line
    8. Exclude the stub Class1.cs file from the project
    9. Build the dll and copy to the folder C:\Program Files (x86)\Geosoft\resourcefiles\bin
    10. Create an omn file:

    MENU "&NewGDB"
    ITEM "&NewGDB" ,ClassLibrary1.dll(ClassLibrary1.GXtest;Run)

    11. Load the menu into Oasis, run the menu item and the form displays as per the design in the VS project
    12. Return to the VS project and add the GX controls from the Geosoft.GX.Controls dll in the redist/bin folder to the toolbox
    13. Open the GXtest.cs in design view, delete the banner text from the form and add a GX Button control
    14. Close Oasis, repeat step 8, click on the menu item and it will now display the modified form

    So the main remaining issue is that I still have no understanding of the use of the [Translation(...)] line and how to resolve the reference in case it is actually important.

    I will mainly be working on building dll's for my current project, so I think that I'll be ok with this now. However, I am planning on also building stand-alone applications using the API in the near future. So can I please request that you provide a simple description of how this can be done. Just a simple set of steps would be of immense help!

    Best regards
  • JosephCaluag1
    Hi John,

    The Translation attribute is an attribute we use for our internationalization support. Adding a reference to Geoengine.Core.Managed will remove your warnings. This attribute is not required and can be omitted from your code.

    If you would like to create a standalone program, I would recommend looking at the chanadd example under the gxnet folder. There's also a bit of information regarding standalone programs here:

This discussion has been closed.