Could not load type 'UnifiedAutomation.UaBase.CertificateFactory' from assembly 'UnifiedAutomation.UaBase

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Moderator: uasdknet

Post Reply
gaurav139690
Jr. Member
Jr. Member
Posts: 3
Joined: 16 Aug 2022, 14:53

Could not load type 'UnifiedAutomation.UaBase.CertificateFactory' from assembly 'UnifiedAutomation.UaBase

Post by gaurav139690 »

Hi Team,

I am trying to evaluate the trial version for my custom app before purchasing the license.
I have created an empty Visual Studio 2019 C# solution and can fetch the endpoints in the solution. It means that the Nugets , License and Config files are configured correctly.

Next I try to create my client certificate by below code:

Code: Select all

       
                 ApplicationInstanceBase m_application;
                 
                //Commented: m_application = settings.Application;
                //Commented: if (m_application == null)
                //Commented: {
                
                m_application = ApplicationInstance.Default;
                
                //Commented: }
                
                //Create the new certificate.
                using (var factory = m_application.SecurityProvider.CreateCertificateFactory())
                {
                    m_certificate = factory.CreateCertificate(storePath, settings);
                }
It gives me below error:

Code: Select all

Could not load type 'UnifiedAutomation.UaBase.CertificateFactory' from assembly 'UnifiedAutomation.UaBase, Version=3.1.3.0, Culture=neutral, PublicKeyToken=90c158e6f23d82c1'.
Please help me with resolving the error.

If I copy paste same code in "Basic Client example solution" then it works just fine. So clearly there is something amiss in my custom blank VS 2019 solution.

In the "Basic Client example solution", I have managed to fetch all the nodes recursively from my server on a PLC and now I am trying to create my custom project and UI for the evaluation.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: Could not load type 'UnifiedAutomation.UaBase.CertificateFactory' from assembly 'UnifiedAutomation.UaBase

Post by Support Team »

Hello,

We cannot reproduce this issue. Please create a sample project and attach it to a support ticket.
Best regards
Unified Automation Support Team

Post Reply