GetAssemblySoftwareVersion null|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
GetAssemblySoftwareVersion null
Avatar
John Cockrell
Member
Members
Forum Posts: 8
Member Since:
12/16/2020
sp_UserOfflineSmall Offline
1
10/14/2024 - 07:25
sp_Permalink sp_Print

Hi

 

We are running the server in a dll which is loaded by LabView, but we get the below error where it seems to try to get the assembly software version for the OpcUa application. Have you seen this before or have any idea how any idea what we could try to solve it? It works when run from visual studio pro (C#) but not when loaded from LabView.

 

System.NullReferenceException: Object reference not set to an instance of an object. at Opc.Ua.Utils.GetAssemblySoftwareVersion() at Opc.Ua.EndpointBase..ctor(ServerBase server) at Opc.Ua.SessionEndpoint..ctor(ServerBase server) at Opc.Ua.Server.StandardServer.GetEndpointInstance(ServerBase server) at Opc.Ua.ServerBase.CreateServiceHostEndpoint(Uri endpointUri, EndpointDescriptionCollection endpoints, EndpointConfiguration endpointConfiguration, ITransportListener listener, ICertificateValidator certificateValidator) at Opc.Ua.Bindings.TcpServiceHost.CreateServiceHost(ServerBase serverBase, IDictionary`2 hosts, ApplicationConfiguration configuration, IList`1 baseAddresses, ApplicationDescription serverDescription, List`1 securityPolicies, X509Certificate2 instanceCertificate, X509Certificate2Collection instanceCertificateChain) at Opc.Ua.Server.StandardServer.InitializeServiceHosts(ApplicationConfiguration configuration, TransportListenerBindings bindingFactory, ApplicationDescription& serverDescription, EndpointDescriptionCollection& endpoints)” at Opc.Ua.ServerBase.Start(ApplicationConfiguration configuration) at Opc.Ua.Configuration.ApplicationInstance.<Start>d__33.MoveNext() — End of inner exception stack trace — at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at OpcBridge.OpcServer.OpcuaServerController.StartServer()—> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object. at Opc.Ua.Utils.GetAssemblySoftwareVersion() at Opc.Ua.EndpointBase..ctor(ServerBase server) at Opc.Ua.SessionEndpoint..ctor(ServerBase server) at Opc.Ua.Server.StandardServer.GetEndpointInstance(ServerBase server) at Opc.Ua.ServerBase.CreateServiceHostEndpoint(Uri endpointUri, EndpointDescriptionCollection endpoints, EndpointConfiguration endpointConfiguration, ITransportListener listener, ICertificateValidator certificateValidator) at Opc.Ua.Bindings.TcpServiceHost.CreateServiceHost(ServerBase serverBase, IDictionary`2 hosts, ApplicationConfiguration configuration, IList`1 baseAddresses, ApplicationDescription serverDescription, List`1 securityPolicies, X509Certificate2 instanceCertificate, X509Certificate2Collection instanceCertificateChain) at Opc.Ua.Server.StandardServer.InitializeServiceHosts(ApplicationConfiguration configuration, TransportListenerBindings bindingFactory, ApplicationDescription& serverDescription, EndpointDescriptionCollection& endpoints) at Opc.Ua.ServerBase.Start(ApplicationConfiguration configuration) at Opc.Ua.Configuration.ApplicationInstance.<Start>d__33.MoveNext()<—

Avatar
John Cockrell
Member
Members
Forum Posts: 8
Member Since:
12/16/2020
sp_UserOfflineSmall Offline
2
10/15/2024 - 00:45
sp_Permalink sp_Print sp_EditHistory

Fixed. The issue was that the DLL didn’t have an ‘InformationalVersion’ attribute after ILMerging.

Added  [assembly: AssemblyInformationalVersion(“1.0.0.0”)]

In

.Properties\AssemblyInfo.cs

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 18
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1446
Posts: 4890