Skip to content

C# (.NET)

First, select your operating system:

Operating system:

There are two options for creating a C# project and adding the library in Windows:

There are two options for creating a C# project and adding the library in Mac OS:

There are two options for creating a C# project and adding the library in Linux:

Visual Studio

To add the library in Visual Studio:

  • Create a new Console Project by selecting File > New > Project..., then selecting either Console App (.NET Core) or Console App (.NET Framework).
  • After the project is created, select Project > Manage NuGet Packages... in the menu bar.
  • In the package manager, select the Browse tab.
  • Search for Zaber.Motion, then select it from the results and click Install. Click OK in the confirmation dialog.
  • When the package manager is finished installing the library, you can close the package manager. Your project should now contain a reference to the Zaber.Motion library.

Visual Studio for Mac

You may need to install the "NuGet Package Management Extensions" first using Tools > Extension Manager. To add the library once this extension has been installed:

  • Create a new console application using File > New Solution. Select either .NET Core > App > Console Application or Other > .NET > Console Project, then click Next.
  • Choose names for the project and the solution, then select the location to create it and click Create.
  • After the solution is created, select the project heading in the solution explorer, then from the Project menu select Add NuGet packages....
  • In Add Packages, search for Zaber.Motion. Check the box next to it in the package list, select the latest version, and click Add Package.

MonoDevelop

You may need to install the "NuGet Package Management Extensions" first using Tools > Extension Manager. To add the library once this extension has been installed:

  • Create a new console application using File > New Solution. Select either .NET Core > App > Console Application or Other > .NET > Console Project, then click Next.
  • Choose names for the project and the solution, then select the location to create it and click Create.
  • After the solution is created, select the project heading in the solution explorer, then from the Project menu select Add NuGet packages....
  • In Add Packages, search for Zaber.Motion. Check the box next to it in the package list, select the latest version, and click Add Package.

You may continue the Getting Started guide by running the example code.

You may continue the Getting Started guide by initializing the library in your code.

DotNet command line

First, confirm that DotNet is installed by entering the following command into a terminal and confirming a version is returned:

dotnet --version
# Example output:
# 6.0.403

Create a new project and switch to that directory by entering the following commands into the terminal (replace example with your desired project name):

dotnet new console --name example
cd example

Then add the Zaber.Motion library to your project by entering the following in the terminal:

dotnet add package Zaber.Motion

Open the project in a code editor, then continue the Getting Started guide by running the example code.

Open the project in a code editor, then continue the Getting Started guide by initializing the library in your code.

Updating

To update to the latest version, use one of the following methods:

Visual Studio

  • Select Project > Manage NuGet Packages....
  • Select the Installed tab in the package manager.
  • You should see Zaber.Motion in the list including information about what version you currently have. Select it then select Update.

MonoDevelop

  • Select the project heading in the solution explorer then select Project > Update NuGet packages... to update all NuGet dependencies to the latest versions.
  • To update only one dependency, open the Packages or NuGet group under the project's heading in the solution explorer, right-click on Zaber.Motion, then select Update from the context menu.

To determine the current version, right-click on Zaber.Motion under the project's Packages or NuGet group in the solution explorer; the current version appears at the top of the context menu.

Visual Studio for Mac

  • Select the project heading in the solution explorer then select Project > Update NuGet packages... to update all NuGet dependencies to the latest versions.
  • To update only one dependency, open the Packages or NuGet group under the project's heading in the solution explorer, right-click on Zaber.Motion, then select Update from the context menu.

To determine the current version, right-click on Zaber.Motion under the project's Packages or NuGet group in the solution explorer; the current version appears at the top of the context menu.

DotNet command line

The command to update the library using the DotNet command line is the same as the command to add the library. Enter the following command in the root directory of your project:

dotnet add package Zaber.Motion

To determine what version of the library you already have, enter the following command in the root directory of your project:

dotnet list package