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

I’ve created a custom activity in visual studio and migrated to .NET 6 as steps given on the following page: https://docs.uipath.com/developer/other/latest/developer-guide/migrating-activities-to-net

After creating a .nupkg package and while trying to install it from UiPath Studio (manage packages), it gives the following error.

Cannot load assembly: C:\Users\PrashanthD.nuget\packages\numberssum.activities\1.0.8\lib/net6.0-windows7.0/MathSquareOfSum.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.
File name: ‘System.Activities, Version=6.0.3.0, Culture=neutral, PublicKeyToken=null’
at System.Reflection.RuntimeAssembly.GetExportedTypes()
at UiPath.Studio.Plugin.Workflow.Services.AssemblyContainerBase.AddAssemblyInternal(Assembly assembly, String path)
at UiPath.Studio.Plugin.Workflow.Services.AssemblyContainerBase.<>c__DisplayClass15_0.b__0(Tuple`2 range)

Thanks for any relevant response in advance.

Hi @Prashanth_D

Verify that your custom activity project references the correct version of ‘System.Activities’ (version 6.0.3.0 in this case). You can do this by right-clicking on your project in Visual Studio, selecting “Manage NuGet Packages,” and checking the version of ‘System.Activities’ in the installed packages.

Thanks!!

Hi @Nitya1

Thanks for your response.

I’ve got the package through the project references (assemblies which is of version 4.0.0.0). It did not help.
I believe there is no System.Activities NuGet package with version 6.0.3.0. I’ve tried finding for it, but no luck. Please help me with it if you can. It will be a great help.

Thanks!!