Page 1 of 1

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

Posted: 01 Sep 2022, 16:04
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.

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

Posted: 16 Jan 2023, 19:59
by Support Team
Hello,

We cannot reproduce this issue. Please create a sample project and attach it to a support ticket.