Language - C Sharp: Difference between revisions
Line 50: | Line 50: | ||
|| [[Image:Language_csharp_vscode_addnugetpackage.png|center|350px|link=https://cdn.phidgets.com/docs/images/2/26/Language_csharp_vscode_addnugetpackage.png]] | || [[Image:Language_csharp_vscode_addnugetpackage.png|center|350px|link=https://cdn.phidgets.com/docs/images/2/26/Language_csharp_vscode_addnugetpackage.png]] | ||
|- | |- | ||
| When prompted, enter '''Phidget22.NET''' and install the package.|| [[Image:Language_csharp_vscode_phidget22net.png|center|350px|link=https://cdn.phidgets.com/docs/images/d/d5/Language_csharp_vscode_phidget22net.png]] | | When prompted, enter '''Phidget22.NET''' and install the latest package.<br><br>'''Note''': Ensure you are downloading the latest version which can be seen [{{SERVER}}/?view=changelog here]. Visual Studio Code may incorrectly show an older version as the ''latest'' by default.|| [[Image:Language_csharp_vscode_phidget22net.png|center|350px|link=https://cdn.phidgets.com/docs/images/d/d5/Language_csharp_vscode_phidget22net.png]] | ||
|- | |- | ||
|- | |- |
Latest revision as of 19:47, 13 June 2025
Get Started
With the Phidget22.NET library, it's easy to create C# applications that work with Phidget devices.
C# Libraries
Nuget Package
The Phidget22.NET library is available as a nuget package. This is the recommend way to install and manage the Phidget22.NET library.
macOS Considerations
Phidget devices running a HID USB stack require the installation of the macOS libraries or the standalone Phidget Control Panel (download here).
To determine what USB stack your Phidget device is on, navigate to the product page and then to the specification tab, and look for the USB Stack specification. If you are using a VINT device, navigate to the product page for the VINT Hub you are using.
Linux Considerations
Linux restricts access to USB devices to the root user. To run your .NET application as a regular user, you'll need to set up udev rules on your system.
Library Files
If you would like to manually manage the Phidget22.NET library files, you can download them here.
Development Environment Configuration
Visual Studio
Visual Studio Code
.NET Command-Line Interface (CLI)
Example Code
Navigate to our Code Sample Generator to view and download code samples that are tailored to your specific device.
Phidget Programming Basics
To learn more about the structure of the example code, visit our Phidget Programming Basics guide.