Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Version 2023.1 Browsing for OPC UA Items - Exception

More
22 Sep 2023 05:16 #12213 by support
Hello.

Please do not report any more assembly loading exceptions until we get your project references & binding redirects fixed. I received your email with the new .vbproj and will respond.

Regards

Please Log in or Create an account to join the conversation.

More
22 Sep 2023 05:00 #12212 by micham
Hi,

I am getting an exception when trying to browse OPC items. See below. My code is below. It is similar to your sample code in EasyOPCUADemo sample project.

Friend WithEvents uaDataDialog1 As OpcLabs.EasyOpc.UA.Forms.Browsing.UADataDialog

uaDataDialog1.EndpointDescriptor = "opc.tcp://DEV2017:48010"
If uaDataDialog1.ShowDialog() = DialogResult.OK Then
TempID = uaDataDialog1.NodeDescriptor.NodeId
End If


Exceptions

Type: System.TypeInitializationException
Data:
HelpLink:
HResult: -2146233036 (0x80131534)
InnerException:
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
at Opc.Ua.Utils..cctor()

=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
(Fully-specified)
LOG: Appbase = file:///D:/MyBin/Proj-VS2017/EBO-OPC Client/Configuration(4)/bin/x86/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : Opc.Ua.Core, Version=1.4.371.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(4)\bin\x86\Debug\EBOOPCClientCFG.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: Attempting download of new URL file:///D:/MyBin/Proj-VS2017/EBO-OPC Client/Configuration(4)/bin/x86/Debug/Microsoft.Extensions.Logging.Abstractions.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Data:
FileName: Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
FusionLog:
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
(Fully-specified)
LOG: Appbase = file:///D:/MyBin/Proj-VS2017/EBO-OPC Client/Configuration(4)/bin/x86/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : Opc.Ua.Core, Version=1.4.371.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(4)\bin\x86\Debug\EBOOPCClientCFG.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60
LOG: Attempting download of new URL file:///D:/MyBin/Proj-VS2017/EBO-OPC Client/Configuration(4)/bin/x86/Debug/Microsoft.Extensions.Logging.Abstractions.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

HelpLink:
HResult: -2146234304 (0x80131040)
InnerException:
Message: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=3.1.28.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source: Opc.Ua.Core
StackTrace: at Opc.Ua.Utils..cctor()
TargetSite: Void .cctor()
DeclaringType: Opc.Ua.Utils
Module: Opc.Ua.Core.dll
Assembly: Opc.Ua.Core, Version=1.4.371.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8
CustomAttributes:
FullyQualifiedName: D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(4)\bin\x86\Debug\Opc.Ua.Core.dll
MDStreamVersion: 131072
MetadataToken: 1
ModuleHandle: System.ModuleHandle
MDStreamVersion: 131072
ModuleVersionId: e90038f5-d9d5-4c0c-b2e7-eda655301ec4
Name: Opc.Ua.Core.dll
ScopeName: Opc.Ua.Core.dll
Message: The type initializer for 'Opc.Ua.Utils' threw an exception.
Source: Opc.Ua.Core
StackTrace:
at Opc.Ua.Utils.SetTraceMask(Int32 masks)
at OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.InitializeSdkTrace()
at OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.InitializeSdk()
at OpcLabs.EasyOpc.UA.Toolkit.Client.UAClientEngineBase.InitializeSdk()
at OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.ConnectSdk()
at OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.InternalConnect()
at OpcLabs.EasyOpc.UA.Toolkit.UAEngineBase.Connect()
at OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.EasyUAClientEngine.InnerBrowseNodes(UABrowseArguments[] browseArgumentsArray, EasyUAAdaptableParameters adaptableParameters)
at OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.EasyUAClientEngine.BrowseNodes(UABrowseArguments[] browseArgumentsArray, EasyUAAdaptableParameters adaptableParameters)
at OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.NetSdkEasyUAClient.<InternalBrowseMultipleNodes>b__95_2(IReadOnlyList`1 list)
at OpcLabs.BaseLib.Collections.Generic.Extensions.IReadOnlyListExtension.IfThenElse[TInput,TOutput](IReadOnlyList`1 readOnlyList, Predicate`1 condition, Func`2 thenListSelector, Func`2 elseListSelector)
at OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.NetSdkEasyUAClient.InternalBrowseMultipleNodes(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.NetSdkEasyUAClient.<>c__DisplayClass41_0.<BrowseMultiple>b__0()
at OpcLabs.BaseLib.Internal.DisposableObject.DisposeGuard[TResult](Func`1 func, Boolean throwOnDisposed)
at OpcLabs.BaseLib.Internal.DisposableObject.DisposeGuardNotNull[TResult](Func`1 func, Boolean throwOnDisposed)
at OpcLabs.EasyOpc.UA.Implementation.NetSdk.Client.NetSdkEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.DelegatingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.ErrorTransformingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.DelegatingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Optimization.Implementation.RequestMergingEasyUAClient.<BrowseMultiple>b__1_0(UABrowseArguments[] array)
at OpcLabs.BaseLib.OperationModel.Extensions.IReadOnlyListOfOperationArgumentsExtension.MergingPerform[TArguments,TResult](IReadOnlyList`1 argumentsList, Func`2 arrayOperationFunction)
at OpcLabs.EasyOpc.UA.Optimization.Implementation.RequestMergingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.DelegatingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.LicensingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.MultiplexingEasyUAClient.<>c.<BrowseMultiple>b__9_0(IEasyUAClient client, IReadOnlyList`1 list)
at OpcLabs.BaseLib.Collections.Generic.Extensions.IReadOnlyListExtension.SwitchCase[TInput,TOutput,TKey](IReadOnlyList`1 readOnlyList, Func`2 keySelector, IEqualityComparer`1 keyComparer, Func`3 outputSelector)
at OpcLabs.EasyOpc.UA.Implementation.MultiplexingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.ForwardingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.Implementation.DelegatingEasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.EasyUAClient.BrowseMultiple(UABrowseArguments[] browseArgumentsArray)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.BrowseOne(IEasyUAClient client, UABrowseArguments browseArguments)
at OpcLabs.EasyOpc.UA.IEasyUAClientExtension.BrowseOne(IEasyUAClient client, UAEndpointDescriptor endpointDescriptor, UANodeDescriptor nodeDescriptor, UABrowseParameters browseParameters)
at OpcLabs.EasyOpc.UA.Browsing.Internal.UANodeBrowseable.BrowseNodes(Object parentNode, UABrowseParameters browseParameters, Predicate`1 nodePredicate, IEnumerable`1& leaves, IEnumerable`1& exceptions)
at OpcLabs.EasyOpc.UA.Browsing.Internal.UANodeBrowseable.BrowseBranches(Object parentNode, Object nodeFilter, IEnumerable`1& branches, IEnumerable`1& exceptions)
at OpcLabs.BaseLib.Forms.Browsing.Parts.ConditionalBrowseable.BrowseBranches(Object parentNode, Object nodeFilter, IEnumerable`1& branches, IEnumerable`1& exceptions)
at OpcLabs.BaseLib.Forms.Browsing.Parts.BrowseNodesControl.BrowseChildrenJob0(Object parameters)
at OpcLabs.BaseLib.Forms.Browsing.Parts.BrowseNodesControl.<>c__DisplayClass768_0.<CreateSafeBackgroundThread>b__0(Object obj)
at OpcLabs.BaseLib.Threading.Utilities.ThreadUtilities.<>c__DisplayClass1_1.<CreateProtected>b__1()
at OpcLabs.BaseLib.Extensions.Internal.ActionExtension.ProtectedInvoke(Action action, Boolean allowCancellation)
TargetSite: Void SetTraceMask(Int32)
DeclaringType: Opc.Ua.Utils
Module: Opc.Ua.Core.dll
Assembly: Opc.Ua.Core, Version=1.4.371.0, Culture=neutral, PublicKeyToken=bfa7a73c5cf4b6e8
CustomAttributes:
FullyQualifiedName: D:\MyBin\Proj-VS2017\EBO-OPC Client\Configuration(4)\bin\x86\Debug\Opc.Ua.Core.dll
MDStreamVersion: 131072
MetadataToken: 1
ModuleHandle: System.ModuleHandle
MDStreamVersion: 131072
ModuleVersionId: e90038f5-d9d5-4c0c-b2e7-eda655301ec4
Name: Opc.Ua.Core.dll
ScopeName: Opc.Ua.Core.dll
TypeName: Opc.Ua.Utils

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.097 seconds