sdk
latest
false
UiPath logo, featuring letters U and I in white
Developer Guide
Last updated Oct 25, 2024

Building the solution and creating the NuGet package

Packaging project

The UiPath.Activities.Template includes a packaging project that creates a NuGet package every time the solution is built. Alternatively, you can manually create a package using NuGet Package Explorer.

It is important to configure the packaging project to ensure the correct metadata is added to the package. To do this, open the packaging CSPROJ file and configure the properties described in the following table.

PropertyDescription
GeneratePackageOnBuildWhether to generate a package when building the solution
VersionBuildBuild number
VersionRevisionRevision number
PackageIdName of the package
VersionPrefix Condition="'$(Configuration)' == 'Release'"Version prefix for a stable release
VersionPrefix Condition="'$(Configuration)' == 'Debug'"Version prefix for a debug release
AuthorsAuthor of the package, for example your team or organization. Do not add UiPath as the package author.
PackageTagsTags to display for the package
DescriptionPackage description
PackageIconUrlURL of the icon to add to the package
PackageOutputPathFolder where to create the package
TargetsForTfmSpecificBuildOutputWhat to include in the build output
The properties for the sample Calculator activity look as follows:
<PropertyGroup>
		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
		<VersionBuild>$([System.DateTime]::UtcNow.DayOfYear.ToString("F0"))</VersionBuild>
		<VersionRevision>$([System.DateTime]::UtcNow.TimeOfDay.TotalMinutes.ToString("F0"))</VersionRevision>
		<PackageId>UiPath.MyCustom.Activities</PackageId>
		<VersionPrefix Condition="'$(Configuration)' == 'Release'">1.0.0</VersionPrefix>
		<VersionPrefix Condition="'$(Configuration)' == 'Debug'">1.0.$(VersionBuild)-dev.$(VersionRevision)</VersionPrefix>
		<Authors>MyCompany</Authors>
		<PackageTags>UiPathActivities</PackageTags>
		<Product>UiPath.MyCustom.Activities</Product>
		<PackageIconUrl>https://download.uipath.com/UI_icon.png?web</PackageIconUrl>
		<PackageOutputPath>..\Output\Activities\Packages\</PackageOutputPath>
		<TargetsForTfmSpecificBuildOutput>AddDlls</TargetsForTfmSpecificBuildOutput>
		<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
	</PropertyGroup><PropertyGroup>
		<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
		<VersionBuild>$([System.DateTime]::UtcNow.DayOfYear.ToString("F0"))</VersionBuild>
		<VersionRevision>$([System.DateTime]::UtcNow.TimeOfDay.TotalMinutes.ToString("F0"))</VersionRevision>
		<PackageId>UiPath.MyCustom.Activities</PackageId>
		<VersionPrefix Condition="'$(Configuration)' == 'Release'">1.0.0</VersionPrefix>
		<VersionPrefix Condition="'$(Configuration)' == 'Debug'">1.0.$(VersionBuild)-dev.$(VersionRevision)</VersionPrefix>
		<Authors>MyCompany</Authors>
		<PackageTags>UiPathActivities</PackageTags>
		<Product>UiPath.MyCustom.Activities</Product>
		<PackageIconUrl>https://download.uipath.com/UI_icon.png?web</PackageIconUrl>
		<PackageOutputPath>..\Output\Activities\Packages\</PackageOutputPath>
		<TargetsForTfmSpecificBuildOutput>AddDlls</TargetsForTfmSpecificBuildOutput>
		<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
	</PropertyGroup>

Building the project

Make sure you test the project for errors before attempting to build it. To build the solution, select Build Solution from the Build menu.

  • The default location where solutions are saved is %UserProfile%\source\repos.
  • The default location where NuGet packages are saved is %UserProfile%\source\repos\<Solution_Folder>\<Solution>\Output\Activities\Packages.
  • Packaging project
  • Building the project

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.