Skip to main content

Upgrading to the 12.5 API


There have been two major changes when upgrading to version 12.5 from an earlier version.

Eliminating J#

Starting with version 12.5 we no longer use J#. (We instead us IKVM which coverts WindwardReports.jar to .NET managed code.) This requires a couple of changes:

  1. Do not install J#. (You can, but we don't use it.)
  2. Remove the reference to vjsdist.dll in your code (if you had it).
  3. You may need to add a reference to IKVM.OpenJDK.Core.dll. You definitely need this if you are writing a custom function.

Changing the API to use generics

We upgraded the API to the .NET engine to use generics. This will require a few small changes in your code:

  1. KeyPairDictionary is replaced with Dictionary<string, object>.
  2. KeyPairDictionary.Contains() is replaced with Dictionary<string, object>.ContainsKey().
  3. If a method or property previously returned an array, and you need the returned collection as an array, call .ToArray() on the returned IList<>.
  4. If you called .Length on an array, that is now .Count on the IList<>.

The changes are primarily:

  1. Passing all collections in as an IEnumerable<> instead of an array.
  2. Returning all collections as an IList<> instead of an array.
  3. Replacing KeyPairDictionary with Dictionary<string, object>.

When updating to this new version, we strongly recommend that you change your internal variables to be a similar type. You can just call .ToArray() on the returned lists, but you then do not gain the advantage of using the generic collections.

ps - When we added this change to AutoTag (which makes massive use of the engine API), we had 96 errors due to the change. However, we only had to make 18 edits to the code & 23 changes of .Length to .Count. Changing the object types in AutoTag to match the new API eliminated a lot of the errors. It also simplified the code where we made the changes.

The unit tests had several hundred required changes. But that's because we call the API literally thousands of different ways to test.

  • Was this article helpful?