
C# 13 and .NET 9 – Modern Cross-Platform Development Fundamentals
By :

Before we learn how to create and package our own libraries, we will review how a project can use an existing package.
Let's say that you want to add a package created by a third-party developer, for example, Newtonsoft.Json
, a popular package for working with the JavaScript Object Notation (JSON) serialization format:
In the AssembliesAndNamespaces
project, add a reference to the Newtonsoft.Json
NuGet package, either using the GUI for Visual Studio or the dotnet add package
command using the CLI.
With the April release of C# Dev Kit, you can now manage your NuGet packages directly from VS Code using some commands in the command palette, as described at the following link: https://devblogs.microsoft.com/nuget/announcing-nuget-commands-in-c-dev-kit/.
AssembliesAndNamespaces.csproj
file and note that a package reference has been added, as shown in the following markup:<ItemGroup>
<...