Hello.
What happens here is that the default location of the certificate stores in the current working directory, and not the directory of the running executable. We have "inherited" this behavior because we are using OPC Foundation .NET stack as the bottom layer, and it is, in fact, documented (e.g.
opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Late...ry%20Certificate%20Stores.html , where it says 'When you develop and application with OPC Studio and target .NET 6+, or you are running an OPC Studio application that is based on .NET 6+, the default directory certificate store paths all start with the %LocalFolder% token, which on resolves to the current working directory of the application.").
But I am completely with you that this is not the ideal behavior. We will think of whether / how to change it in a future version.
For now, your options are:
- Change the current working directory for the process being started. This requires using a different overload of the Process.Start method, the one with ProcessStartInfo as an arguments, and
learn.microsoft.com/en-us/dotnet/api/system.diagnostics.proc....workingdirectory?view=net-8.0 .
or
- Modify the location of UA certificate stores inside your application to be whenever you like them - and you can base that the on the directory where the executable file is, if you like. See
opclabs.doc-that.com/files/onlinedocs/OPCLabs-OpcStudio/Late...or%20certificate%20stores.html (the example is in PHP; in C# you would simply set properties like EasyUAApplication.Instance.ApplicationParameters.ApplicationManifest.InstanceOwnStorePath = ... ).
I hope this helps
Best regards