CodedWorkflow throwing CS0246 and SYSLIB0046 when attempting to publish

I updated to Studio 24.10.1 recently and have since been unable to package automations. Anytime I add a coded workflow to a project, publishing will fail with the following messages:

Unexpected error has occurred during the library compilation process:
The assembly compilation returned the following errors:
 * \\Mac\Home\Documents\UiPath\BlankProcess1\.local\.codedworkflows\CodedWorkflow.cs(37,19): error CS0246: The type or namespace name 'ConnectionsManager' could not be found (are you missing a using directive or an assembly reference?)
 * \\Mac\Home\Documents\UiPath\BlankProcess1\.local\.codedworkflows\CodedWorkflow.cs(26,22): error CS0246: The type or namespace name 'ConnectionsManager' could not be found (are you missing a using directive or an assembly reference?)
 * \\Mac\Home\Documents\UiPath\BlankProcess1\.local\.codedworkflows\CodedWorkflow.cs(32,48): error CS0246: The type or namespace name 'ConnectionsManager' could not be found (are you missing a using directive or an assembly reference?)
 * \\Mac\Home\Documents\UiPath\BlankProcess1\.local\.codedworkflows\CodedWorkflow.cs(32,78): error CS0246: The type or namespace name 'ConnectionsManager' could not be found (are you missing a using directive or an assembly reference?)
 * \\Mac\Home\Documents\UiPath\BlankProcess1\.local\install\Workflow+WorkflowActivity.cs(47,17): warning SYSLIB0046: 'ControlledExecution.Run(Action, CancellationToken)' is obsolete: 'ControlledExecution.Run method may corrupt the process and should not be used in production code.'

Theses particular messages come from a new, blank project in which I created a coded workflow file and did nothing else. Publishing a new project without creating the coded workflow is successful.

I have already attempted uninstalling and reinstalling Studio, as well as clearing my nuget package cache as a precaution, with no luck. The processes I’m trying to publish also run without issue in Studio.

I have no idea why the ConnectionsManager error is being thrown, as the file for it exists in the project and in the expected namespace. I can even use “Go to definition” to access the CodedWorkflows file, then the ConnectionsManager file from there.

Should I simply go into the files generated by Studio and disable the warnings for the relevant lines of code? I’ve avoided altering such files until now, since I’ve not found anyone else mentioning this problem. At the same time, I’m unsure how it could be the result of something I’m doing, considering this happens on new projects.

@emilia.williams

Can you attach a sample project here please

Cheers

Create a ticket to UiPath Support.

Provide the:

  • Studio project archived in a zip file
  • UiPath Diagnostic Tool logs
  • If in your project you are using custom libraries, provide them also as nupkg
  • Provide a screenshot from Studio → Help → we need to see the Studio details from the right
  • The exact steps to replicate the issue

I went ahead and opened a Support ticket, per Marian’s request.

2 Likes

A solution was found during my meeting with Manjula from the UiPath Support Team! I’ll provide the cause of the issue here, in case anyone happens to encounter this later and is looking for the answer.

I’m currently running Windows 11 on MacOS via Parallels. The directory where I stored my projects was part of my Mac’s Documents directory, which I made available to Windows. I’ve had this setup for the past year without any problems, but something in recent updates - whether to Studio, Parallels, one of the OS’s, or a combination - caused the publishing error. When a new directory is created in the C drive in Windows, the publishing works again.

So, if running Studio through a VM, you just need to ensure your project directories are created in the VM’s drive.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.