Install Syncfusion Maui NuGet packages
10 Jan 20245 minutes to read
Overview
NuGet is a Package management system for Visual Studio. It makes it easy to add, update and remove external libraries in our application. Syncfusion publishing all Maui NuGet packages in nuget.org. The Syncfusion Maui NuGet packages can be used without installing the Syncfusion installation. You can simply exploit the Syncfusion Maui NuGet packages in your Maui application to develop with the Syncfusion Maui components.
Installation using Package Manager UI
The NuGet Package Manager UI allows you to search, install, uninstall, and update Syncfusion Maui NuGet packages in your applications and solutions. You can find and install the Syncfusion Maui NuGet packages in your Visual Studio Maui application and this process is easy with the steps below:
-
Right-click on the Maui application or solution in the Solution Explorer, and choose Manage NuGet Packages…
As an alternative, after opening the Maui application in Visual Studio, go to the Tools menu and after hovering NuGet Package Manager, select Manage NuGet Packages for Solution…
-
The Manage NuGet Packages window will open. Navigate to the Browse tab, then search for the Syncfusion Maui NuGet packages using a term like “Syncfusion Maui” and select the appropriate Syncfusion Maui NuGet package for your development.
NOTE
The nuget.org package source is selected by default in the Package source drop-down. If your Visual Studio does not have nuget.org configured, follow the instructions in the Microsoft documents to set up the nuget.org feed URL.
-
When you select a Maui package, the right side panel will provide more information about it.
-
By default, the package is selected with the latest version. You can choose the required version and click the Install button and accept the license terms. The package will be added to your Maui application.
-
At this point, your application has all the required Syncfusion assemblies, and you will be ready to start building high-performance, responsive app with Syncfusion Maui components. Also, you can refer to the Maui help document for development.
Installation using Dotnet (.NET) CLI
The dotnet Command Line Interface (CLI), allows you to add, restore, pack, publish, and manage packages without making any changes to your application files. Dotnet add package adds a package reference to the application file, then runs dotnet restore to install the package.
Follow the below instructions to use the dotnet CLI command to install the Syncfusion Maui NuGet packages.
- Open a command prompt and navigate to the directory where your Maui application file is located.
-
To install a NuGet package, run the following command.
dotnet add package <Package name>
For Example:
dotnet add package Syncfusion.Maui.CoreNOTE
If you don’t provide a version flag, this command will be upgrading to the latest version by default. To specify a version, add the -v parameter: dotnet add package Syncfusion.Maui.Core -v 24.1.45.
-
Examine the Maui application file after the command has completed to ensure that the Syncfusion Maui package was installed. To see the added reference, open the .csproj file.
-
Then, run dotnet restore command to restore all the packages listed in the application file.
- At this point, your application has all the required Syncfusion assemblies, and you will be ready to start building high-performance, responsive app with Syncfusion Maui components. Also, you can refer to the Maui help document for development.
Installation using Package Manager Console
The Package Manager Console saves NuGet packages installation time since you don’t have to search for the Syncfusion Maui NuGet package which you want to install, and you can just type the installation command to install the appropriate Syncfusion Maui NuGet package. Follow the instructions below to use the Package Manager Console to reference the Syncfusion Maui component as NuGet packages in your Maui application.
-
To show the Package Manager Console, open your Maui application in Visual Studio and navigate to Tools -> NuGet Package Manager -> Package Manager Console.
-
The Package Manager Console will be shown at the bottom of the screen. You can install the Syncfusion Maui NuGet packages by entering the following NuGet installation commands.
Install specified Syncfusion Maui NuGet package.
The following command will install the Syncfusion Maui NuGet package in the default Maui application.
Install-Package <Package Name>
For example: Install-Package Syncfusion.Maui.Grid
NOTE
You can find the list of Syncfusion Maui NuGet packages which are published in nuget.org from here
Install specified Syncfusion Maui NuGet package in specified Maui application
The following command will install the Syncfusion Maui NuGet package in the given Maui application.
Install-Package <Package Name> - ProjectName <Project Name>
For example: Install-Package Syncfusion.Maui.Grid -ProjectName SyncfusionMauiApp
-
By default, the package will be installed with latest version. You can give the required version with the -Version term like below to install the Syncfusion Maui NuGet packages in the appropriate version.
Install-Package Syncfusion.Maui.Core -Version 24.1.45
-
The NuGet package manager console will install the Syncfusion Maui NuGet package as well as the dependencies it has. When the installation is complete, the console will show that your Syncfusion Maui package has been successfully added to the application.
-
At this point, your application has all the required Syncfusion assemblies, and you will be ready to start building high-performance, responsive app with Syncfusion Maui components. Also, you can refer to the Maui help document for development.