Skip to content

Commit 0e1ee9e

Browse files
Adds installation instructions to README (#2797)
* Adds installation instructions to README Adds detailed instructions on how to install both release and pre-release versions of the .NET MAUI Community Toolkit. Includes guidance on setting up NuGet sources and using GitHub Packages for pre-release versions, emphasizing the need for a personal access token. * Update README.md Co-authored-by: Copilot <[email protected]> * Update README.md Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 3887270 commit 0e1ee9e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,32 @@ All of the [documentation](https://learn.microsoft.com/dotnet/communitytoolkit/m
1818

1919
https://learn.microsoft.com/dotnet/communitytoolkit/maui/get-started
2020

21+
## Installation
22+
23+
The release versions of .NET MAUI Community Toolkit are available at Nuget.org as NuGet packages. You can install them using the following commands in your terminal or Package Manager Console:
24+
25+
```bash
26+
dotnet add package CommunityToolkit.Maui
27+
dotnet add package CommunityToolkit.Maui.MediaElement
28+
dotnet add package CommunityToolkit.Maui.Maps
29+
dotnet add package CommunityToolkit.Maui.Camera
30+
```
31+
32+
You can also try the latest pre-release version of the main branch. We use GitHub Packages to host the pre-release versions of the .NET MAUI Community Toolkit. To install the pre-release version, you need to add the GitHub Packages source to your NuGet configuration. GitHub Packages only supports authentication using a personal access token (classic) (https://github.com/settings/tokens). For more information, see [Managing your personal access tokens](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). You can use a personal access token (classic) to authenticate to GitHub Packages. When you create a personal access token (classic), you can assign the token different scopes depending on your needs, but `read:packages` is enough.
33+
34+
```bash
35+
dotnet nuget add source https://nuget.pkg.github.com/CommunityToolkit/index.json -n CommunityToolkitGitHubNuget -u YOUR_GITHUB_USERNAME -p YOUR_GITHUB_PERSONAL_ACCESS_TOKEN
36+
```
37+
38+
and then install the packages as follows:
39+
40+
```bash
41+
dotnet add package CommunityToolkit.Maui --version 99.0.0-preview980
42+
dotnet add package CommunityToolkit.Maui.MediaElement --version 99.0.0-preview980
43+
dotnet add package CommunityToolkit.Maui.Maps --version 99.0.0-preview980
44+
dotnet add package CommunityToolkit.Maui.Camera --version 99.0.0-preview980
45+
```
46+
2147
## Getting Started
2248

2349
In order to use the .NET MAUI Community Toolkit you need to call the extension method in your `MauiProgram.cs` file as follows:

0 commit comments

Comments
 (0)