Windows Compatibility Mode still not showing Custom Activities

Hi there,

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:

  1. Add reference to the System.Activities.dll

FYI: I’m using Visual Studio 2022 Community Edition.

Any help would be much appreciated.

Note: I’ve been to some of the forums and nothing seems to work for me.

@CWK

Hello Jordan,
welcome in the UiPath Community.

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:

<dependencies>
  <group targetFramework=".NETFramework4.6.1" />
  <group targetFramework="net6.0-windows7.0" />
</dependencies>

With this, your activity should be visible in the package manager in Windows compatibility mode.

Best regards
Stefan

1 Like

Hi @StefanSchnell,

Thank you so much for your help. You are right, it was the dependencies that is missing in the metadata source.

Hoping that could help somebody else, I am using Nuget Explorer to edit the dependencies. My steps are as follows:

  1. Open Nuget Package using Nuget Explorer
  2. Choose Edit > Edit Metadata Source
    image
  3. Add the dependencies

It should now show up in the Manage Packages

Regards,

Jordan C

2 Likes

Hi @StefanSchnell,

I have another issue here. Upon installing the package, I get the following:

image

Here is a link to my DLL and Nuget Package - https://easyupload.io/m/ce9kys

@CWK

Hello Jordan,
your package structure is not correct. Add a lib folder with a net6.0-windows7.0 and it works so far.

image

image

The compilation at UiPath fails, it seems you reference to a wrong version of System.Activities assembly.

image

Best regards
Stefan

Hi @StefanSchnell,

Thank you for the feedback. It’s all working good now.

1 Like

Hi, @StefanSchnell

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.

How did you manage to solve this error ?

Many thanks !

@DragosPadurariu

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

1 Like

Hi, @StefanSchnell

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.

1 Like

@DragosPadurariu

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

1 Like

Hi @DragosPadurariu,

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.

1 Like

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