This is a full example project which includes a working sample project that publishes scalars and arrays using OPC UA including TwinCAT Vision Images (derived from TwinCAT Vision ITcVnImage images).
Windows 10 x64 with .NET Framework 4.8 or higher Beckhoff TwinCAT v3.1.4024 or higher, installed stand-alone (integration with Visual Studio is not tested) D:\>TcBuild build SomeSolution.sln I: ...