Error while publishing code: Unexpected error has occurred during the library compilation process

Hi I got error while trying to publish my code, it works fine when I run by Debug.
but when i want to publish the code I got this error. (error Attached)
I created some library by my self.

my studio Version is 2022.4.3

please help.

Thanks.

Hi @christ1201 ,

This is due missing of “Namespace” which you have forget to Import on your project. Please let me what kind of an operation you have preformed so, that i can help you to fix it up

Thanks in advance,
Jayavignesh G

Can you try upgrading your System n Excel pages and see if that helps or IF you recetly upgraded them before publish, Let me know if that works

I have imported all Name Space which needed in the dependency, but the code said its ambigous.
when I run the robot its able to run but sometimes the error come up.

In order to address the bug in the studio, I have encountered it myself on occasion. The solution to this issue is to compile your code before pushing it to the orchestrator. To do so, try running the solution without the need to execute the entire process. Once the program is compiled, you can stop the studio and proceed to publish your code. This approach helps ensure that any potential errors or bugs are caught and resolved before deploying the solution.

Hi @confuse_coder, you mean I should to compile the code like Run the code?
But I have try to run debug the error still appear.(like this image)

Are you using any NuGet packages in your code that have been developed in C# or another programming language?

Hi @confuse_coder I create library using VB, Windows from Studio, not from another programing language.

To resolve the error you encountered while publishing the UiPath solution, you need to modify your library by including the following packages:

a) System.ComponentModel.TypeConverter
b) System.ComponentModel.Composition

Ensure that these packages are up to date and compatible with your library. You can update the packages by either reinstalling them or updating them to the latest versions.

After updating the packages, rebuild your library to ensure that all dependencies are correctly resolved.

Next, incorporate the modified library into your UiPath solution. Add the updated versions of the packages mentioned above to your solution’s dependencies.

Once you have integrated the modified library with the updated packages, you should be able to publish your code successfully without encountering the previous error.

hi @confuse_coder ok let me try to do that.
and I will give feedback here

1 Like