# C# SDK Introduction

The C# SDK leverages the power of .NET to help you create robust and feature-rich plugins for Logitech devices. This guide walks you through setting up your development environment and building your first plugin using the *Logi Actions SDK for C#*.

tip

New to the Logi Actions SDK? Start with the [Getting Started](/actions-sdk-docs/getting-started.md) guide to learn about supported devices, choose between C# and Node.js SDKs, and understand the ecosystem.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

Before you begin, ensure you have:

* Basic knowledge of .NET and C# development
* A code editor or IDE supporting .NET development (e.g., Visual Studio Code, Visual Studio 2022 Community Edition or higher, or JetBrains Rider)

For general prerequisites including host applications and supported devices, see the [Getting Started](/actions-sdk-docs/getting-started.md#prerequisites) guide.

## Installation and First Build[​](#installation-and-first-build "Direct link to Installation and First Build")

The following steps guide you through installing the required tools and creating a working C# plugin project.

1. **Install the host application.** Ensure you have the latest Logitech Options+ or Loupedeck software installed:

   * Logitech Options+: <https://www.logitech.com/software/logi-options-plus.html>
   * Loupedeck: <https://loupedeck.com/downloads/>

   note

   Installing a host application also installs the *Logi Plugin Service* application, which manages and runs plugins.

2. **Install the .NET 8 SDK.** Download it from <https://dotnet.microsoft.com/download/dotnet/8.0>

3. **Install Logi Plugin Tool.** Open a terminal and run the following command to install the `LogiPluginTool` package as a .NET tool:

   ```
   dotnet tool install --global LogiPluginTool
   ```

   note

   *Logi Plugin Tool* is a command-line tool that allows you to create C# plugin projects, package plugins for distribution, and verify plugin packages.

4. **Generate a plugin project.** Use the *Logi Plugin Tool* to create a new plugin project:

   ```
   logiplugintool generate Example
   ```

   where "Example" is the name of the plugin. The command creates a folder named `ExamplePlugin` in the current directory.

5. **Build the plugin.** Navigate to the generated folder and build the solution:

   ```
   cd ExamplePlugin
   dotnet build
   ```

6. **Verify the build output.** Confirm that the build produces a `.link` file in the *Logi Plugin Service* Plugins directory:

   * Windows
   * macOS

   ```
   C:\Users\USERNAME\AppData\Local\Logi\LogiPluginService\Plugins\ExamplePlugin.link
   ```

   ```
   /Users/USERNAME/Library/Application Support/Logi/LogiPluginService/Plugins/ExamplePlugin.link
   ```

   note

   The `.link` file tells the *Logi Plugin Service* where to find your plugin during development. When the plugin project is built, this file is updated to point to the build output directory. When the `.link` file exists, the plugin is loaded from the location specified in the file.

7. **Test the plugin.** Launch Logitech Options+ or Loupedeck software and wait for the configuration UI to appear.

   * In the Logitech Options+ software, open the customization view for Actions Ring, MX Creative Keypad, or MX Creative Dialpad device. Then navigate to "All Actions" and verify that the "Example" plugin appears under the "Installed Plugins" section. If the plugin is not shown on the list, go to the Options+ settings and select "Restart Logi Plugin Service".

   * In the Loupedeck software, unhide the "Example" plugin on the "Show and hide plugins" tab of the Action Panel. The plugin should be now shown in the UI.

## Hot Reloading[​](#hot-reloading "Direct link to Hot Reloading")

You can optionally use the .NET Hot Reload feature to automatically rebuild the plugin project and reload the plugin in the host application whenever a source code file is saved.

To start hot reloading, first navigate to the plugin project's `src` directory, then run the watch command:

* Windows
* macOS

```
cd ExamplePlugin\src\
dotnet watch build
```

```
cd ExamplePlugin/src/
dotnet watch build
```

More information about .NET Hot Reload: <https://devblogs.microsoft.com/dotnet/introducing-net-hot-reload/>
