Here you can find my private notes about programming that I wanted to share with you. Feel free to filter based on the topic you want or search for something specific.
How to deal with the NuGet hell of transitive dependencies in your .NET projects
Navigating through the complexity of NuGet package dependencies aka “NuGet hell” in .NET applications can be a daunting task. The project.assets.json file, found in the obj folder of your .NET projects, is a crucial resource in managing these dependencies. This file provides detailed information about the packages used, including direct and transitive dependencies. In this article, we’ll explore what the project.assets.json file is, how to use it to understand your dependencies, and how it can help you keep your packages up to date.
How to run Puppeteer Sharp in a Linux Docker container
Puppeteer Sharp is a a website crawler for C#. I personally use it to crawl websites for price information of products that I am interested in. In this article, you are going to learn about the configurations you have to do if you want to use the crawler in a Linux hosted web application.
Integrate a Web App with a CosmosDB database using a Virtual Network Service Endpoint in Azure
Consider the following real-life application scenario. Your Web App (Azure App Service) accesses a CosmosDB instance to read data. Your users access the web application from its UI, and you want to ensure they cannot directly access the CosmosDB instance using its public URL.
In this article, you will learn:
How to use a System Managed Identity and RBAC roles to access your CosmosDB instance from your Web App
How to integrate your Web App and your CosmosDB with an Azure Virtual Network
How to create a Service Endpoint to allow only the Virtual Network to access CosmosDB
All the necessary az CLI commands to complete the tutorial, without using the Azure Portal UI :)
Deploy a .NET & Angular application to an Azure App Service with multiple environments using an Azure Pipeline and Bicep
In this article, I will show you a full tutorial on how to create a .NET application using Angular for the frontend and deploy this application with Azure DevOps pipelines on multiple App Service environments.
You are going to learn:
How to use pipeline templates to simplify the structure of our pipeline
How to use multiple stages to split semantically different jobs
How to use multiple Azure environments by elevating the power of a for loop in the pipeline
How to use Bicep for setting up the needed Azure infrastructure
How to deploy the application on an Azure App Service by using different deployment slots
You can find the code for this tutorial on my GitHub account.
Mastering C# array slicing - A guide to the .. (range) and ^ (hat) operators
From time to time, I like to refresh my knowledge of some basic features of C#. Today, we are going to focus on the .. operator, also known as the range operator, and the ^ operator, also known as the hat operator.