UiPaths Activity Creator extension for Visual Studio (icon and logo missing)

Hi

I am working with the “UiPath Activity Creator extension for Visual Studio” and I have no issues building and customizing the project.
However I do have problems with:

  1. The Activity Icon always shows the default Icon - even if I create the key for my activity in Icons.xaml:

<DrawingBrush x:Key="GetWorkbookSheetIcon" Drawing="{StaticResource SimpleDrawingGroup}" />
(if I in the activity Designer instead refer directly to e.g. a “icon.png”, then it is shown correctly)

  1. The logo for the NuPkg is not shown in UiPath Studio - only the default logo. Even if I setup and overwrite the logo referred to from the .csproj file:

<PackageIcon>packageIcon.png</PackageIcon>
(I checked that the correct packageIcon.png is copied into the NuPkg file)

Only if I use the “old method” it works:

<PackageIconUrl><url directly to png file></PackageIconUrl>

I tried rebuild solution several times, but nothing updates in the Design for the Activity or the NuPkg.

Please let me know if you have any good ideas? Maybe I am missing something?

Best Regards,
Martin

Hi @mmc,

When you’re publishing your package, which Configuration are you using?
I suspect you’re doing everything right, but if you’re using the Release configuration, the same version of the package will be built and UiPath Studio will continue to use the older version that it has cached.

You can clear this cache by closing UiPath Studio, going to C:\Users\<You>\.nuget\packages, deleting the folder for your activity, and then rebuilding.

If this isn’t the case, please post your icons.xaml file and GetWorkbookSheetDesigner.xaml files.

1 Like

Update: It appears this is a UiPath Studio bug preventing PackageIcon from working. Please use PackageIconUrl until this is fixed

1 Like

Hi @DeanMauro

Thank you for your reply. I will use the PackageIconUrl for now for the issue with the Package Icon.

For the other issue with the “missing” Activity Icon I have attached the following files, where I try to reuse the already designed Activity Icon for a simple Activity. However it still looks like this without the icon:
image

Here are the files packed in a zip-file:
ActivityDesigner.zip (2.8 KB)

Please let me know if you have more ideas or solutions.

Best Regards,
Martin

These all seem correct so perhaps the problem is elsewhere. Would you mind sharing the entire solution?

1 Like

Hi @DeanMauro

Sorry for the late answer. I do not have the original solution anymore, but I just created a new simple solution in Visual Studio and I see the same issue, where no Icon is shown in the Activity Designer.

I attach the solution here: Company.Product.zip (1.7 MB) [Company.Product.zip|attachment]

Best Regards,
Martin

I think I understand now. The icon won’t appear in the designer in Visual Studio; only in UiPath Studio. When you build and import into UiPath, you’ll see this

1 Like

An easy and fast way to customize your Custom Activity Icon in Visual Studio without editing/creating any icons (an alternate to Dean’s example here and here Icon) is to add for example the following code to your icons.xaml file (or replace with this code)

<ResourceDictionary xmlns=“http://schemas.microsoft.com/winfx/2006/xaml/presentation” xmlns:x=“http://schemas.microsoft.com/winfx/2006/xaml”>
<DrawingGroup x:Key=“SimpleDrawingGroup”>
<GeometryDrawing Brush=“Green” Geometry=“M3,5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5M5,5V19H19V5H5M11,7H13A2,2 0 0,1 15,9V10H13V9H11V15H13V14H15V15A2,2 0 0,1 13,17H11A2,2 0 0,1 9,15V9A2,2 0 0,1 11,7Z” />
</DrawingGroup>
<DrawingBrush x:Key=“TestIcon” Drawing=“{StaticResource SimpleDrawingGroup}” />
</ResourceDictionary>

Where x:Key=“TestIcon” , means the icon for the custom activity named “Test” and the Geometry string (the icon shape) can be easily obtained for example from the site https://materialdesignicons.com/ by right clicking on any icon there selecting “View XAML (DrawImage)” from the dropdown and selecting the text for Geometry. The XAML format here matches that used at https://materialdesignicons.com/. The Geometry data cannot be used as a direct substitute in Dean’s icon XAML example.

Hope this helps those playing with Icons for custom activities.