The new C# API

Find and share HowTos to various installations / configurations!
Search

Post Reply
13 posts • Page 2 of 2
wenjie.meng
Posts: 4
Joined: Tue Dec 20, 2022 5:03 am

Re: The new C# API

Post 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.

User avatar
kilianvp
Posts: 443
Joined: Fri Jan 16, 2015 10:29 am

Re: The new C# API

Post 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.

wenjie.meng
Posts: 4
Joined: Tue Dec 20, 2022 5:03 am

Re: The new C# API

Post by wenjie.meng »

Thank you @kilianvp

Post Reply
13 posts • Page 2 of 2