Summary: Setting up Visual Studio project to use the space-based .NET API.

Overview

A few settings need to be configured before you start developing using the GigaSpaces API. These are described in the following sections.

Managed References

The main assembly is GigaSpaces.Core.dll. This assembly provides the core space functionality (read, write, take, notify, etc.) for PONOs. It is strong-named, so you can use it in strong-named solutions, place it in the GAC (Global Assembly Cache), etc. It has two dependencies:

  • netrtsn.dll – a managed runtime library for .NET-Java interoperability.
  • GigaSpaces.Core.Interop.Java.dll – auto-generated .NET proxies for Java classes.

In most scenarios, all you need to reference is GigaSpaces.Core.dll – Visual Studio automatically copies the dependencies to the output folder to simplify debugging. However, since some features are not yet fully supported by the .NET proxy (for example, JDBC), you can also reference GigaSpaces.Core.Interop.Java.dll and work with Java classes directly.

Unmanaged References

In-process Java-.NET interoperability requires an unmanaged component to bridge the managed platforms. Hence, the managed runtime library, netrtsn.dll, uses an unmanaged library called xmogrt.dll. Unfortunately, the Visual Studio dependency mechanism only detects managed dependencies, so the xmogrt.dll file is not copied to the output folder.

Since the unmanaged library is required only at runtime, your project might compile successfully, but when you run it you will get an exception indicating that xmogrt.dll is not found.

There are two common solutions to this problem:

  • Copy xmogrt.dll to one of the folders which are automatically searched by Windows, or add it to the Path environment setting.
  • In your Visual Studio project, create a post-build event which copies xmogrt.dll to the target folder. For example:
    copy <GigaSpaces Root>\dotNET\lib\xmogrt.dll $(OutDir)
GigaSpaces.com - Legal Notice - 3rd Party Licenses - Site Map - API Docs - Forum - Downloads - Blog - White Papers - Contact Tech Writing - Gen. by Atlassian Confluence