How to - C# - Net 5.0 / Net 6.0 - Cross-Platform - Code Activity / Native Activity

I’m struggling through the documentation on creating custom code activities in Visual Studio for UiPath. Using the Activity Creator Extension is somewhat useful but has some limitations in how it is currently designed. One of them being you cannot choose the mode to build your Activity. (eg. Windows-Legacy Net 4.6.1 ; Cross-Platform Net 5.0 / Net 6.0 ; Windows Net 6.0-windows / Net6.0-windows7.0) I cannot for the life of me figure out what exactly the dependencies are for each .NET version for creating a code based activity, the taking over of WWF into CoreWF / UiPath.Workflow and the custom System.Activities / System.Activities.Metadata / System.Activities.Core.Presentation aren’t making it any easier to figure out what exactly is needed. This is especially true because there doesn’t seem to be one valid repository/package feed for these packages and the ones I can find seem out of date, leaving me to hunt through UiPath’s nugets to try to pull out the newer versions of these packages.

All of this being said, can someone clearly state the minimum dependencies / project files (eg. class files / designer files?) to create a code based activity for .Net 4.6.1 ; .Net 5.0 ; .Net 6.0 ; and .Net 6.0 Windows? Can someone also tell me if there is any official package feeds that actually have all these dependencies?

1 Like

(post deleted by author)

@Aeryn_Connerley or anyone else on this thread.

I have been trying to figure this stuff out but get plenty of errors with compliation stuff.
I wonder if you can try some stuff on your machine to help me figure out if I have local issues?

It you use the UiPath Extension to create a new project using the UiPath template in VS 2022 it creates it in the net60 framework, but I cannot get it to compile cause of a code analysis error thing.

I got the cross platform stuff pretty much done (I think) except for this issue. If you can make an empty UiPath project in VS then the issue is defo local to me.

@Jon_Smith I’ve noticed what appears to be a bug in the extension, vs (visual studio), or my local machine whenever it adds an activity it programmatically modifies the resources file but for some reason vs doesn’t recognize that the resources file has been updated, manually entering that resources file and adding any bogus value saving then deleting that value and saving again will cause it to recognize that the resources file has been updated, maybe that is your issue, tell us a bit more to see if we can narrow it down.

Side note: pulling start the vs extension and inspecting the code, they are using the recommended methods to programmatically access and edit the resources file insofar as I can tell

Excuse any typos, replying from phone