Search Results for

    Show / Hide Table of Contents

    Automating Build and Packing

    It is possible to automate the process of creating a .rspak file whenever a new build of the Add-In is compiled in Visual Studio. We can implement this behavior using the Post-build events. This topic showcases how to create a simple script file that will copy the necessary files for creating a .rspak file.

    Automatically make a .rspak file

    1. Create a .rspakspec file in the Add-In's project. See RSpakTool and Manifest file for more information. Make sure that the .rspakspec file is located in the root directory of the project (Default location). Below is a sample .rspakspec file illustrating a basic structure:

      <?xml version="1.0" encoding="utf-8"?>
      <!-- Template rspakspec which demonstrates RobotStudio and RobotWare add-ins and documentation -->
      <!-- Add, remove and modify contents as required -->
      
      <DistributionPackageSpec xmlns="urn:abb-robotics-robotstudio-distributionpackagespec">
      
        <!--Root directory in the form <name>-<version>. This is the identity of the package.-->
        <RootDir>Company.PackageName-0.1</RootDir>
      
        <!--This will be copied to manifest.xml-->
        <DistributionPackage>
          <Title>Package title</Title>
          <DisplayVersion>0.1</DisplayVersion>
          <Creator>Company</Creator>
          <Description>Description</Description>
          <Date />
        </DistributionPackage>
      
        <!--Specifies files inside the Root directory. Wildcards are supported for the file name. -->
        <Files>
          <File src="bin\Debug\RobotStudioEmptyAddIn2.dll" target="RobotStudio\Add-In" />
          <File src="RobotStudioEmptyAddIn2.rsaddin" target="RobotStudio\Add-In" replaceParameters="true" />
        </Files>
      </DistributionPackageSpec>
      
    2. Open the Build Properties for the active project, accessible from the Solution Explorer by right clicking the Properties icon.

    3. Navigate to the Build Events tab and locate the Post-build event command line.

    4. Add the following command to the post-build event command line to create the rspak using RspakTool.

      Note

      Replace {version} with your RobotStudio SDK version name, and {fileName} with the name of your .rspakspec file.

      "C:\Program Files (x86)\ABB\SDK\RobotStudio {version} SDK\RspakTool.exe" -i "$(ProjectDir){fileName}.rspakspec" -p version=1.0
      

    See Also

    • Creating a RobotStudio Add-In
    • Building an Add-In
    • Creating an Add-In File
    • Debugging an Add-In
    • Structure of a Distribution Package
    • Packing and Distributing an Add-In
    • RSpakTool
    In this article
    Back to top Copyright © 2026 ABB Robotics