Page 2 of 2

Re: The new C# API

Posted: Sat Dec 24, 2022 4:45 am
by wenjie.meng
I follow the new api document build my first console app on Linux (Oracle Linux 9), I got a error message when just run this statement :IOaManager myManager = OaSdk.CreateManager();

Code: Select all

Exception has occurred: CLR/System.TypeInitializationException
An unhandled exception of type 'System.TypeInitializationException' occurred in ETM.WCCOA.Interop.dll: 'The type initializer for 'ETM.WCCOA.Internal.CSharpBridgePINVOKE' threw an exception.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 System.DllNotFoundException : Unable to load shared library 'CsCoreBridgeV319' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libCsCoreBridgeV319: cannot open shared object file: No such file or directory
   at ETM.WCCOA.Internal.CSharpBridgePINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_CSharpBridge(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
   at ETM.WCCOA.Internal.CSharpBridgePINVOKE.SWIGExceptionHelper..cctor()
some one can help me? thank you.

Re: The new C# API

Posted: Wed Dec 28, 2022 3:26 pm
by kilianvp
You need to set LD_LIBRARY_PATH env

Code: Select all

export WINCCOA_HOME=/opt/WinCC_OA/3.19
export PATH=$PATH:$WINCCOA_HOME/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$WINCCOA_HOME/bin
If you start the Manager from WinCC OA Console LD_LIBRARY_PATH env is already set.

Re: The new C# API

Posted: Wed Jan 11, 2023 3:08 am
by wenjie.meng
Thank you @kilianvp