How to create Nuget package of Custom NativeActivity

Hello,
I have a trouble with compiling my own custom activity based on NativeActivity class.

I have two objects. The first is .cs file that I know how to compile by MSVS to .dll, create Nuget package, import it to the UiPath Studio and use.

But I want to connect it to the second file - the .xaml file and use my own design. I know how to create that .xaml design but I thing my problem is somewhere in compiling the project to .dll, because it seems just .cs file is used and I do not know how to solve it.

Anyone knows?
Thank you

Hi @Ondrej_Macek

I am not sure I understand. Wouldn’t you want to create a Library project, in which you would load your custom activity, create a workflow while using this activity and then Publish it from Studio?

Thank you @loginerror for your reply. Any maybe sorry for missunderstanding.

I already solved my problem. For those who would like to do something similar:

I created a Class Library project file IncrementFormula.cs in MS Visual Studio C# based on NativeLibrary

public class IncrementFormula : NativeActivity
{ …

And a design for it IncrementorDesign.xaml.

To connect the design .xaml to a library file .cs is necessary to define library’s design by following line:

[Designer(typeof(IncrementorDesigner))]
public class IncrementFormula : NativeActivity
{ …

Hope it helps to someone.
Cheers

2 Likes