5 Must Install NuGet Packages for New Xamarin Projects
Tags: xamarin, beginners, csharp, dotnet
Published: 2020-12-09 17:07:58

---
title: 5 Must Install NuGet Packages for New Xamarin Projects
published: true
date: 2020-12-09 16:52:18 UTC
tags: xamarin,beginners,csharp,dotnet
cover_image: https://montemagno.com/content/images/size/w700/2020/12/github_shadows_banner.png
canonical_url: https://montemagno.com/essentials-nugets-for-new-xamarin-projects/
---

Starting your first project can be a bit overwhelming. I mean heck, I [wrote nearly 3,000 words](https://montemagno.com/build-your-first-for-ios-android-app-with-xamarin-and-visual-studio/) breaking down every bit of what to select and what each option means. Oh, and I also have a [full video series](https://www.youtube.com/playlist?list=PLwOF5UVsZWUiHY1CkRVjYJ6dm0iCvAlfw) walking you through it step by step on my [YouTube channel](https://www.youtube.com/jamesmontemagno). Before I start writing code in my projects I take some time to [configure my projects](https://youtu.be/7kVeC1_14Ag) and then install essential NuGet packages that help me be super productive from the start.

Yes, it is true that Xamarin.Forms and Xamarin.Essentials are included "in the box" with your new project, but there is a world of amazing libraries out there from amazing community members. I want to introduce you to my favorite packages that are key in ever app that I have developed. So, let's get started.

## [MVVM Helpers](https://github.com/jamesmontemagno/mvvm-helpers?WT.mc_id=friends-0000-jamont) 🎉

I may be a bit bias with these first 2 NuGet packages because I wrote them, but I think they are super essentials. First is [MVVM Helpers](https://www.nuget.org/packages/Refractored.MvvmHelpers/) (Refractored.MvvmHelpers), a super small library that works in any app that contains nifty classes and utilities that help creating your app from the start. It includes things such as:

- **ObservableObject** : A Simple implementation of INotifyPropertyChagned
- **BaseViewModel** : The only base view model you will ever need. It implements INotifyPropertyChanged and a bunch of default properties such as **Title, SubTitle, Icon, IsBusy, IsNotBusy, CanLoadMore**.
- **ObservableRangeCollection** : Best way to group items into a Key/Value pair ObservableCollection for managing groups of data.
- AsyncCommand: An async version of ICommand!

So, now you can just start your project and write code like this:

```
public class MonkeyViewModel : BaseViewModel
{
	public MonkeyViewModel()
    {
    	Title = "Monkeys";
    }
    
    public ObservableRangeCollection<Monkey> Monkeys { get; } = new ();
    
    AsyncCommand doStuffCommand;
    public AsyncCommand DoStuffCommand => doStuffCommand ??= new AsyncCommand(AsyncMethod);
    
    string name;
    public string Name
    {
    	get => name;
        set => SetProperty(ref name, value);
    }
    
    public Task AsyncMethod()
    {
    	return Task.CompletedTask
    }
}
```

## [Monkey Cache](https://github.com/jamesmontemagno/monkey-cache?WT.mc_id=friends-0000-jamont) 🐵

This nice little caching library enables you to easily store data objects for set amount of times. For example you may want to cache web results for a few minutes. It integrates directly with the[file system](https://www.nuget.org/packages/MonkeyCache.FileStore/), [SQLite](https://www.nuget.org/packages/MonkeyCache.SQLite/), or [LiteDB](https://www.nuget.org/packages/MonkeyCache.LiteDB/)so you can write code like this:

```
public async Task<T> GetAsync<T>(string url, int minutes = 3)
{
    var json = string.Empty;   

    if (!Barrel.Current.IsExpired(url))
    {
    	json = Barrel.Current.Get<string>(url);
    }
    else
    {
        json = await client.GetStringAsync(url);
        Barrel.Current.Add(url, json, TimeSpan.FromMinutes(minutes));
    }
    
    return JsonConvert.DeserializeObject<T>(json);
}
```

Wow, data caching in 3 lines of code! :)

## [PancakeView](https://github.com/sthewissen/Xamarin.Forms.PancakeView?WT.mc_id=friends-0000-jamont) 🥞

My apps can not live without the [PancakeView NuGet](https://www.nuget.org/packages/Xamarin.Forms.PancakeView/) from [Steven Thewissen](https://twitter.com/devnl). It gives your apps a breadth of new life with beautiful gradients, cards, custom rounded corners, and so much more. I mean look at this beautiful thing:

![5 Must Install NuGet Packages for New Xamarin Projects](https://montemagno.com/content/images/2020/12/ezgif-3-d0886d25827a.gif)

## [Sharpnado](https://github.com/roubachof/Sharpnado.Presentation.Forms?WT.mc_id=friends-0000-jamont) 🦈🌪

Alright, technically Sharpnado is a bunch of smaller libraries, but you get to pick and choose because there is so much awesome from [Jean-Marie Alfonsi](https://www.sharpnado.com/about/).

First is [Sharpnado.Tabs](https://www.nuget.org/packages/Sharpnado.Tabs)... fully customizable Tabs that you can put anywhere!

![5 Must Install NuGet Packages for New Xamarin Projects](https://montemagno.com/content/images/2020/12/image-1.png)

Then there is [Sharpnado.Shadows](https://www.nuget.org/packages/Sharpnado.Shadows), because you know you need to add lovely shadows to all of your views.

![5 Must Install NuGet Packages for New Xamarin Projects](https://montemagno.com/content/images/2020/12/image-2.png)

That is just the start as there is a plethora more available including the [TaskLoaderView](https://www.nuget.org/packages/Sharpnado.TaskLoaderView/), [HorizontalListView](https://www.nuget.org/packages/Sharpnado.Forms.HorizontalListView), and [MaterialFrame](https://github.com/roubachof/Sharpnado.MaterialFrame). You need these libraries!


## [Xamarin Community Toolkit](https://github.com/xamarin/XamarinCommunityToolkit?WT.mc_id=friends-0000-jamont) 🧰

I am really jazzed about this initiative because it is an official package from the Xamarin team, but a deep collaboration with the community. This toolkit is a collection of controls, Animations, Behaviors, Converters, and Effects for mobile development with Xamarin.Forms. It simplifies and demonstrates common developer tasks building iOS, Android, and UWP apps with Xamarin.Forms. The [NuGet is still in pre-release](https://www.nuget.org/packages/Xamarin.CommunityToolkit/) phase for testing, but is packed full of amazing functionality including:

- Toast
- Snackbar
- AvatarView
- MVVM Helpers (awesome stuff from my library)
- C# Markup Extensions
- Tons more!

![5 Must Install NuGet Packages for New Xamarin Projects](https://montemagno.com/content/images/2020/12/ezgif-3-5b3869f45ecf.gif)

## Even More NuGets

These are just a few of my recommended NuGet packages that you should totally check out. There are a lot more awesome community libraries out there that you should checkout and I have a curated list on my [GitHub](https://github.com/jamesmontemagno/xamarin.plugins?WT.mc_id=friends-0000-jamont)!