RemoteException wrapping System.Runtime.InteropServices.COMException: Project already has a reference to assembly

Hello Community,

I have an issue when running a bot, which uses a library.
The error I get is:
RemoteException wrapping System.ApplicationException: Hosted Compiler experienced an internal error. —> RemoteException wrapping System.Runtime.InteropServices.COMException: Das Projekt enthält bereits einen Verweis auf die Assembly “UiPath.DataService.Definition”. Es kann kein zweiter Verweis auf “C:\Users\xxx.yyy.nuget\packages\isg_intranet\1.0.40\lib\net45\UiPath.DataService.Definition.dll” hinzugefügt werden.

English version should be:
RemoteException wrapping System.ApplicationException: Hosted Compiler experienced an internal error. —> RemoteException wrapping System.Runtime.InteropServices.COMException: Project already has a reference to assembly “UiPath.DataService.Definition”. A second reference to “C:\Users\xxx.yyy.nuget\packages\isg_intranet\1.0.40\lib\net45\UiPath.DataService.Definition.dll” cannot be added.

So my Setup is:
I have created a library, which uses Entities and DataService and a workflow doing some handling.
The workflow uses a entities as in arguments.
When calling the workflow from within a test-workflow inside the library project, everything’s fine.
When integrating the library in another project and calling the workflow as an activity, it fails when running.

I found this topic here BC2000: compiler initialization failed unexpectedly: Project already has a reference to assembly UiPath.Database.Activities.Design.resources
But both suggested ways do not work. My Studio version is 21.10.5, which is also the latest one I could download from the cloud.
And downgrading packages does not work in my case, as it is a self-made library, which is causing the issue.

I already tried around heavily and found out, that the problem does not occur immediately after integrating the workflow.
I even can declare variables, which use the library’s entities.

The Problem only arises, when I use this variable as input argument for the workflow:
image

Could you give some advice or help with this issue?

I am working with UIPath for over a year now, but I am new in this community.
Hope, I did everything as it is expected.

@thomas.huemer ,

Welcome to UiPath Community!

Can you check this by updating the package from package manager. If same issue occurs then rename the folder 1.0.40 from this location “C:\Users\xxx.yyy.nuget\packages\isg_intranet\1.0.40”, you should have closed all your studio instances before doing this. Then open the process in studio and add that package again and check.

Hi @sarathi125

Thank you for your quick reply.

I actually did both, as I have a newer version of the library already.
So I first renamed the latest library path (which was 1.0.41) and then upgraded the library in my project via package manager (as it ran on 1.0.40).
Got a new folder for the 1.0.41:
image

But problem still exists.

I also did downgrade to a library version where I know, that it was working - Same error.

I have an older version of the bot already running via Orchestrator and it works fine.
When I download that package, which is 100% working and open it with studio on my system → Errormessage

@thomas.huemer - Was this method of using a library and calling it from another workflow working fine earlier?

If yes and if this is happening only because of latest version of Studio, I will suggest opening a support case with UiPath. This seems like a bug which will require developers to look at it and fix it.

One suggestion I can give is to try to not import the entities again in your second project. See, if the entity definitions from your library work in your second project as-is.

Hello @ankit.saraf

Yes, the same logic was working and is still working when running the process via Orchestrator on another machine with unattended licence.
The process in its older version is even running on my machine when started from UI Assistant.

But when I download the perfectly working old package, open it in studio, it does not even debug because of the above mentioned error.

I do not reimport entities again, as I can access them through the namespace of the library.

So Studio Bug you think?

Best,
Tom

Thanks Thomas. Sounds like a Studio bug based on what you describe. Please open a support case.

Done that - Thank you for your advices.
Will give an Update when resolved.

Already got an answer from UIPath Support.
It is a known bug, so will close the topic.

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