UiPath SDK has a new Visual Studio template for custom activities on .NET 6

I am pleased to announce that you can now easily jump-start your .NET 6 custom activity coding experience with a dedicated Visual Studio template and our short guide.

You will find it under the new SDK section on our docs.uipath.com page, where we grouped all the UiPath SDK materials:
image

To start coding your new .NET 6 compatible activities:

  • navigate to the Creating activities with code section of the SDK

  • verify you meet all the pre-requisites (one of which is the new template hosted on our GitHub repository)
    image

  • follow the steps below to learn more about the structure of your new custom activity:
    image

It is that simple!

Definitely give it a try and let us know what you think about it and what we should improve!

We are already planning to add more content to enrich these SDK pages, but knowing what interests you the most or what is not clear enough will help us prioritize :slight_smile:

14 Likes

Most awaited update!

2 Likes

I’ve just skimmed so far, my biggest beef with the AC4 was the Builds would end up failing after adding a new activity. Turned out to be some of the autogenerated deep file paths were too long for my local GitHub. > 255 characters. I had to move the project up a few sub folders.

Edit:
Are the directions “Download the file UiPath.Activities.Template.zip from GitHub and copy it to the Visual Studio user project template location folder.” literally correct? Put the zip in the folder without unpacking?

Creating a Solution with this template spawns these projects:
UiPath.Activities.Template
UiPath.Activities.Template.Packaging
UiPath.Activities.Template.Tests
Which does not match the expectation from SDK - Understanding the Activity Project Structure (uipath.com)

2 Likes

Hey @fred.bullmer

You need to unzip the template SDK and add it to the folder.

The project structure which you mentioned above is right.

That’s right, The explanation was based on legacy creator.

And one observation so far from my side, is the Activity project names not getting updated when we change the names or create with a new project name.

Yes, quite literally!
UiPath.Activities.Template
UiPath.Actitivies.Template.Packaging
UiPath.Actitivities.Template.Tests

Not
mysolutionname
mysolutionname.Packaging
mysolutionname.Tests

(Yes, I’m abusing the usage of “literally” for the fun of it. I’m trying to relate to the generation that developed this and expecting us to do their QA for them.)

2 Likes

@loginerror Kindly for your check !

@loginerror - Thanks for sharing!

Thanks for the extra mention, even though I keep monitoring this topic closely anyway :smiley:

To clarify some of the above points:

  • the project template seems to be working fine with just a zip of the template in the right location (no need to unzip it)
  • there was a small blunder around the “Understanding the Activity Project Structure” page; we will shortly publish the updated page that properly references the new project structure
  • as such, the confusion about the project names/namespace not getting updated with the one used to create the solution is not really an issue (it was not intended to work in the first place); however, we will look into it because it is a neat suggestion

Thank you for your feedback!

3 Likes

Oh, let me try once again and update you.

Thanks much needed.

Agreed, but auto change will be way better as I was facing reference issues and I need to change manually in many other places like metadata files to do a valid publish/build.

1 Like

How do I rename the namespace?

Using the template as-is show the “UiPath.Activities.Template.ActivityTemplate” namespace under the activity property in Studio.
If I try to change the namespace, the solution won’t build. The Creating activities with code guide is lacking, to say the least.

1 Like

Yeah, BUMP because it’s APRIL.

It wasn’t a suggestion. Consider it a demand from the VARs.

Sure we are developers, but we are not full-time UiPath developers. We have customer projects to work on, not fixing UiPath shortcomings.

It really is an issue though, as Studio allows you to add one package with the template namespace per project. It also makes debuggen really hard when you have nothing else but the display name to identify an activity.

What is the diffrence between this and Activity Creator extension?, and which one should be used ?

1 Like

The Activity Creator is deprecated, so you should probably aim for the new template.

1 Like

Idk if this is a correct place to add this question, but as its related to this im asking it out here

So i was trying to add the icon for the actvty in the ActivitiesMetadata.json

{
  "resourceManagerName": "UiPath.Activities.Template.Resources.Resources",
  "activities": [
    {
      "fullName": "UiPath.Activities.Template.ActivityTemplate",
      "shortName": "Calculator",
      "displayNameKey": "Calculator_DisplayName",
      "descriptionKey": "Calculator_Description",
      "categoryKey": "Calculator_Activity_ActivtyCategory",
      "iconKey": "calculator.svg",
      "viewModelType": "UiPath.Activities.Template.ViewModels.ActivityTemplateViewModel"
    }
  ]
}

but for some unknown reason its not showing up in UiPath , this is the same icon that is availbale on the official demo project given by UiPath , here

the icon is store in Resources/Icons folder

then i thought maybe it will only use a key instead of the actual file path so i add the key instead of the file name so i add it in Resources.resx , but nothing happened, same the default icon is showing up , i even just use the original demo project and just build a release version and for that the activity is not even visible in studio

Good morning everyone,

i am trying to use the new VS tempalte to build a custom activity.
how it is possible to add multiple outputs on a single cutom activity? with different types

thank you

Hi @fred.bullmer

Your demand has been met :slight_smile:

Please redownload the template (via this improvement) to make use of the dynamically generated namespaces as per your project name.

2 Likes

Hey @indiedev91

In case this is still an open question, here are two samples on how to achieve it:

1 Like

:slightly_smiling_face: Will try it out and see. Thanks

1 Like