NuGet Unauthorized Access Issue

How to Resolve Unauthorized Access Issue with Private NuGet Repository

Have you ever encountered an issue while trying to restore packages from a private NuGet repository in JetBrains Rider using Azure DevOps? I recently faced a similar problem and struggled with the “401 Unauthorized” error. In this blog post, I will guide you through the steps I took to fix this issue. So, let’s dive in! Azure DevOps and Private NuGet Repositories Azure DevOps is a comprehensive platform that provides a range of tools for software development, including package management with NuGet. Private NuGet repositories in Azure DevOps allow you to host and manage your own packages. You may encounter authentication challenges when you try to restore packages from a private NuGet repository. ...

June 12, 2023 · 4 min · Mohamad Dbouk
Spectre.Console Logo

How to create beautiful console applications with Spectre.Console

Hey there friends! If you are a .NET developer who loves to create console applications, you might have wondered how to make them more appealing and user-friendly. Sure, you can use Console.WriteLine and Console.ReadLine to output some text and get some input, but that’s pretty boring and limited. What if you want to display some colors, styles, tables, trees, progress bars, or even ASCII images? What if you want to parse command-line arguments and create complex commands like git, npm, or dotnet? ...

March 19, 2023 · 6 min · Mohamad Dbouk
Integration Testing and Minimal API in .Net 7

Say Hello to Reliable Minimal APIs with Integration Tests

Hi there! Integration testing is an important part of the software development process because it helps ensure that your APIs are working correctly and returning the expected result. Unfortunately, many people often mix up integration tests with mock testing and use mock for integration tests. This can lead to issues when testing APIs, as mock tests don’t provide a complete picture of how your code will behave in a real-world scenario. ...

January 8, 2023 · 7 min · Mohamad Dbouk
You no longer need a Dockerfile

You no longer need a Dockerfile

The .Net 7 release is bringing a lot of changes, and one of the most significant is the removal of the need for a Dockerfile. Container images are now a supported output type of the .NET SDK. You no longer need a separate Dockerfile to containerize your .NET applications. You can publish your application and it will be built into a container image. This is a significant improvement for .NET developers who want to containerize their applications. It will make it much easier to distribute and run your applications in the cloud. In this article, we’ll take a look at what this change means for you and your applications. ...

December 4, 2022 · 5 min · Mohamad Dbouk
NSubstitute Logo

How to Mock using NSubstitute

Unit tests are code written to test small pieces of functionality of big programs. Performing unit tests is always designed to be simple, A “UNIT” in this sense is the smallest component of the large code part that makes sense to test, mainly a method out of many methods of some class. Unit tests take milliseconds, can be run at the press of a button, and don’t necessarily require any knowledge of the system at large. And when writing unit tests, you need to focus on the UNIT at hand and not consider other dependencies like services or variables. To accomplish that we need to use mocking. There are many Mocking frameworks out there, but today we will check NSubstitute. ...

November 4, 2022 · 2 min · Mohamad Dbouk
CLI

Build your own cli because you can

I have always been impressed by the Azure CLI and how it has played a significant role in my DevOps journey over the years. That got me wondering, how can I build my own CLI in a similar vein to Azure? Follow along in this blog post where I’ll be sharing my step-by-step process for creating a CLI using C# in .NET. Don’t miss out on this exciting adventure! What is CLI A command line interface (CLI) is a text-based user interface used to run programs, manage computer files, and interact with the machine. Back in the day, everything was done on a computer using a CLI, there was no GUI (Graphical User Interface) and the user should learn how to use a CLI to perform different actions on the computer. Nowadays, CLI has become wildly used specifically for a developer or a technical person. Some of the great CLI out there are dotnet, git, GitHub, azure cli, and others. ...

September 26, 2022 · 11 min · Mohamad Dbouk
BenchmarkDotNet Logo

Let’s benchmark .NET using BenchmarkDotNet!

In this blog, we will deep dive into BenchmarkDotNet package and see how it can help us improve our dotnet application. What is Benchmarking? Benchmarking is the act of comparing similar products, services, or processes in the same industry. When benchmarking it is very essential to measure the quality, time, and cost. Benchmarking will let you know if you are working on the latest and best practices across other parties in the same industry and it will help you identify your strengths and weaknesses. ...

September 15, 2022 · 5 min · Mohamad Dbouk