I’ve try literally everything but when I try to create a new custom package, it is not showing in the Windows Compatibility Mode but it is showing in the legacy mode. I’ve been to some of the forum topic but nothing seems to work for me. Below are some of the steps I’ve performed:
Add reference to the System.Activities.dll
FYI: I’m using Visual Studio 2022 Community Edition.
The question is difficult to answer. I assume your NuGet package lacks dependency on net6.0. Open your NuGet package and take a look at the nuspec file. It must contain the following:
I followed you recommendation and it seems to work so far. Unfortunately, I have the same error:
Cannot load assembly: C:\Users\dragos.padurariu.nuget\packages\mypackage\1.0.4\lib/net6.0/TestCustomActivity.dll : System.IO.FileNotFoundException: Could not load file or assembly ‘System.Activities, Version=6.0.3.0, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
Hello Dragos,
it is necessary to reference to the assembly System.Activities.dll in the UiPath Studio directory. After that it should work.
Best regards
Stefan
Thank you for your quick response !
Can you please show me how to reference System.Activities.dll in Uipath Studio Directory ? Unfortunately I can’t figure out how to do that.
Hello Dragos,
do you use Visual Studio to build your custom activity? If so, I won’t really be able to help you, because I use an ASCII editor and not an IDE. I set in the csproj file a HintPath tag to the assembly. You can find information, how to reference an assembly with Visual Studio, here.
Best regards
Stefan
If you are using Visual Studio, then refer to my initial post with a screenshot where I add a reference of System.Activities.dll from UiPath directory.