C# Client#
This guide provides step-by-step instructions to developing and running a Dlubal API client.
Prerequisites#
Before starting, ensure your system meets the following requirements:
Installed .NET SDK (version 8.0)
You’ll need the .NET SDK to install and use NuGet packages in a .NET-based project.
Verify the installation by running:
dotnet --version
Installed Visual Studio Code as your code editor:
Verify the installation by running:
code --version
Installed C# Extension in VS Code:
Open the Extensions view by pressing
Ctrl+Shift+X
.Search for
C#
and click on Install.
Create a New Project#
Open Visual Studio Code.
Open the Integrated Terminal
In VS Code, press
Ctrl+`
to open the terminal, or go to the menu and select Terminal > New Terminal.
Create a New Project
In the Terminal, run the following command to create a new console application project:
dotnet new console -n MyDlubalProject
This will create a new folder named
MyDlubalProject
with a basic console application.
Open the Project Folder in VS Code
Navigate into the newly created project folder and open it:
cd MyDlubalProject code .
Install the Dlubal API Package#
Option 1: Installing from the Terminal (CLI)
Open a Terminal in your project directory.
Run the following command to install the package into your project
dotnet add package Dlubal.Api
Option 2: Installing via the Nuget Package Manager
Install NuGet Package Manager Extension in VS Code
Go to the Extensions view (press
Ctrl+Shift+X
)Search for
NuGet Package Manager
and click Install on the relevant extension.
Use NuGet Package Manager to install the package
After installing the extension, open the Command Palette (press
Ctrl+Shift+P
)Search for
NuGet Package Manager: Add Package
and select it.In the input box, type the name of the package
Dlubal.Api
and select the correct version if needed.The package will be installed and added to your project’s dependencies.
Verify the Installation#
To verify the package has been installed correctly:
Open a Terminal in your project directory.
Run the following command:
dotnet list package
Ensure
Dlubal.Api
appears in the list of installed packages.