I have .Net Framework 4.8 console app which opens connection to WorkflowManagementServer fine, but same line of code in a .NET6 console app throws exception Method not found: System.AppDomainManager.
Why?
Where running K2 Five 5.3.
Code in 4.8 console app:
internal class Program { static void Main(stringr] args) { var k2ConnectionString = "Host=localhost;Port=5555;Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;CachePassword=True"; SourceCode.Workflow.Management.WorkflowManagementServer wfmServer = new SourceCode.Workflow.Management.WorkflowManagementServer(); wfmServer.CreateConnection(); wfmServer.Connection.Open(k2ConnectionString); // works just fine.. //Search error profile and we’ll get the list of errors int errorProfileID = wfmServer.GetErrorProfile("All").ID; SourceCode.Workflow.Management.ErrorLogs errorLogs = wfmServer.GetErrorLogs(errorProfileID);
Code in .NET6 console app:
var k2ConnectionString = "Host=localhost;Port=5555;Integrated=True;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=False;CachePassword=True"; SourceCode.Workflow.Management.WorkflowManagementServer wfmServer = new SourceCode.Workflow.Management.WorkflowManagementServer(); wfmServer.CreateConnection(); wfmServer.Connection.Open(k2ConnectionString); // Throws the error //Search error profile and we’ll get the list of errors int errorProfileID = wfmServer.GetErrorProfile("All").ID; SourceCode.Workflow.Management.ErrorLogs errorLogs = wfmServer.GetErrorLogs(errorProfileID); Console.WriteLine(k2ConnectionString); wfmServer.Connection.Close();