Deployment Via Azure DevOps Leads To Process Failure Due To Could Not Load File Or Assembly

Unable to run the Windows compatibility process if we get the package through Azure pipelines and get the below error message "Could not load file or assembly 'PROCESS NAME, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. at System.Reflection.RuntimeAssembly.InternalLoad(ObjectHandleOnStack assemblyName, ObjectHandleOnStack requestingAssembly, StackCrawlMarkHandle stackMark, Boolean throwOnFileNotFound, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack retAssembly) at System.Reflection.RuntimeAssembly.InternalLoad(AssemblyName assemblyName, RuntimeAssembly requestingAssembly, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, AssemblyLoadContext assemblyLoadContext) at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyName(AssemblyName assemblyName) at UiPath.Executor.WorkflowLoader.GetWorkflowFromXamlPath(WorkflowFile workflowFile) at UiPath.Executor.WorkflowLoader.LoadWorkflow(String xamlPath, String compiledWorkflowAssemblyName) at UiPath.Executor.RobotRunner.InitWorkflowApplication() at UiPath.Executor.RobotRunner.ExecuteJob()"

Root Cause: By default, the Azure DevOps Uipath pack task uses the "Uipath.CLI - 21.10" version and this version can pack only Windows-legacy, cross-platform compatibility process.

Resolution: Add the "Install platform" task before the Uipath pack task in build to pack Windows based projects via Azure DevOps and make sure to select the version equal to or above the version mentioned.

Version: Uipath.CLI.Windows(22.10.X.X or higher)