Getting Started with .NET

Prerequisites

Create a .NET project

Open a terminal, and run the following command:

dotnet new console --output ParagonApiGettingStarted

This will create a new console app in the ParagonApiGettingStarted directory.

Install the Paragon API Nuget Package

Run the following commands:

cd ParagonApiGettingStarted
dotnet add package ParagonApi

This navigates to the project directory and adds the ParagonApi Nuget package to the project.

Add sample code

Replace the contents of Program.cs withing the ParagonApiGettingStarted directory with the following code:

Run the project

Run the following command:

It should produce the following output:

If this is your first time using the Paragon API, the app will open your default web browser to the Paragon Services client and you will be presented with an option to authorize:

If your account is set up properly you should get a success message:

Now when you go back to your terminal you should see the following output indicating that a project has been created successfully.

View the truss

Open the project URL that was outputted in the last step in a browser to see the truss that was created:

Additional Resources

Last updated