The purpose of this article is to show how to update a .Net Backend project from Azure Mobile Services. This mean we will update the references added to the project using Nuget packages.

Introduction

Microsoft Azure Mobile Services is an Azure service offering designed to make it easy to create highly-functional mobile apps using Azure. Mobile Services brings together a set of Azure services that enable backend capabilities for your apps.

When a developer creates a .Net Backend project from Azure Mobile Services, it has several Nuget packages installed. For example, if the project is created in Visual Studio 2013 Update 4, like we can see in the Image 1.

But if we “Manage Nuget Packages” and select “Updates”, the windows will show that there are updates that we can do, like we can see in the Image 2.

Image 2 Manage Nuget Packages - Available Updates

The first thing we can try to do is to click the “Update All” button, that will make sense for developers, but then we will get something as we can see in Image 3.

Image 3 Error updating all

And here are the nightmares about updating the Nuget packages from Azure Mobile Services. Start, because like we can see in the package file, we have 36 Nuget packages installed in the project and it is not so easy to understand the dependencies among the various Nuget packages and if we start updating them one by one we will get errors as in the following in Image 4. So with this it is not possible to update one by one, but the main Nuget packages and in this article we will see how to avoid this problem.

Image 4 Azure Mobile Service with errors

In other words the reference added to the project is not the same version used by any Nuget and it can be hard to understand which is the right version.Description

To understand the Nuget packages and because our project is an Azure Mobile Service project, we can start by analyzing the packages.

This way, we can conclude the Microsoft Azure Mobile Services .NET Backend Entity Framework Extension 1.0.405 Nuget depends on the WindowsAzure.MobileServices.Backend.Tables Nuget and this depends on the WindowsAzure.MobileServices.Backend Nuget. This means if we update the Microsoft Azure Mobile Services .NET Backend Entity Framework Extension Nuget the references related to Azure Mobile Services will be updated.

In the “Manage Nuget Package” click in update the Microsoft Azure Mobile Services .NET Backend Entity Framework Extension Nuget, as we can see in Image 5:

Returning back to the “Updates”, we will see the following Nuget packages that we can update, but for the reasons we saw, it is not possible to update all.

Image 11 Manage Nuget Packages

Conclusion

In conclusion, each developer should be aware of the dependencies among Nuget packages and that more than one package can depend on the same Nuget package but for different versions, this mean it is necessary to keep the versions used by each one.