#Shorts — Using Public Nuget Packages in Azure Synapse

Supercharge C# Code in your Synapse Workspace

Mark Cunningham
Capgemini Microsoft Blog
2 min readAug 31, 2021

--

Photo by Markus Spiske

If you have used Notebooks in Azure Synapse, you will likely have realised that C# has been an option for a while now, but many people are not aware that you can also consume public Nuget packages (as it stands private packages are not supported yet).

Very often the standard approach is to invoke an external Function App using the Web Connector within Synapse pipelines, however we need to challenge that misconception by performing intensive operations using the extremely powerful Apache Spark pool.

I will show an example with a very basic scenario of a Synapse Notebook which performs some very basic JSON manipulation. In the example below, I will use a well known Nuget library called Newtonsoft.Json.

The first step is to get your head around the syntax, and I must admit it is a little confusing, but here we go:

Add some boilerplate code and run the code (example from the official website) and all being well you will have some success.

Credit

If you would like more information on using Nuget packages in Synapse Notebooks, refer to the official documentation here by Microsoft.

The Microsoft Applications and Cloud Engineering Team is hiring. Check out our open roles here for more information.

--

--