Files
imsapidll48/FIX6_IHAS_PROPERTIES_README.md
2026-09-03 21:32:00 +02:00

2.3 KiB
Raw Blame History

FIX6 ihas.properties next to IMSApiDotNet.dll

FIX6 extends FIX5 without changing the public legacy ABI.

Property precedence

The shared IMSApiDotNetBase implementation (therefore both net48 and netstandard2.0) resolves a property in this order:

  1. IMSApiDotNet.setProperty(key, value) / IMSApiDotNetBase.setProperty(key, value)
  2. ihas.properties
  3. fallback/default value used by the caller

Required file location

ihas.properties must be placed in the same directory as the actually loaded IMSApiDotNet.dll.

Example deployment:

MyApplication\
|-- MyApplication.exe
|-- IMSApiDotNet.dll
`-- ihas.properties

For example:

itac.artes.clusternodes=https://partner.itacsoftware.com:8181/mes

The DLL determines its own location through typeof(IMSApiDotNetBase).Assembly.Location and loads:

<Path of loaded IMSApiDotNet.dll>\ihas.properties

The current working directory is not used for normal lookup. itac.propdir remains an accepted legacy property but no longer redirects the physical ihas.properties file location. This prevents a service, console application, IIS host, scheduler, or other host process from accidentally loading a different file because its working directory differs from the DLL directory.

If Assembly.Location is unavailable in a special hosting scenario, AppContext.BaseDirectory is used as the runtime fallback.

File syntax

  • Empty lines are ignored.
  • Lines beginning with # are ignored.
  • Values use key=value syntax.
  • Key and value are trimmed.

Example:

itac.appid=MyApplication
itac.artes.clusternodes=https://partner.itacsoftware.com:8181/mes
itac.artes.connection.timeout=30000
itac.artes.ihas.failover=true

Programmatic values still override the file:

IMSApiDotNet.setProperty("itac.appid", "RuntimeOverride");
var api = IMSApiDotNet.loadLibrary();
api.imsapiInit();

Verification

Run:

.\scripts\check-ihas-properties.ps1
.\scripts\check-legacy-binary-compat.ps1

The property test deliberately changes the process working directory and sets itac.propdir to a different directory containing a conflicting file. The test succeeds only when the file next to the loaded IMSApiDotNet.dll is used. The legacy binary compatibility test remains unchanged.