Blog posts on .NET, Azure, and more.

Working with dotnet8 projects in Visual Studio 2022

October 09, 2023 by Anuraj

VisualStudio dotnet

Recently Microsoft released .NET 8.0 RC. And when we try to load a .NET 8 Web API project in Visual Studio - we will get a message like this. - The current Visual Studio version does not support targeting .NET 8.0. Either target .NET 7.0 or lower, or use Visual Studio version 17.8 or higher.

How to use native AOT to improve performance of ASP.NET Core apps

September 30, 2023 by Anuraj

dotnet aot

This post is about explains what native AOT is and why it is beneficial for ASP.NET Core apps. Native AOT is a deployment model that uses an ahead-of-time compiler to compile IL to native code at the time of publish. Native AOT apps have faster startup time, smaller memory footprints, and can run on machines that don’t have the .NET runtime installed. Please note all the ASP.NET Core features are not currently compatible with native AOT. For instance, ASP.NET Core application types like minimal APIs, gRPC, and worker services are compatible with native AOT, while features such as MVC, Blazor Server, and SignalR are not supported in AOT compilation.

Using Docker environment variables at JavaScript runtime

September 04, 2023 by Anuraj

Docker Javascript

When creating a container for a single-page application with JavaScript frameworks like Angular, React, or Vue.js, we may have to inject certain configuration variables based the deployment environment. A common scenario is using API endpoint URL for the Javascript application which can vary depend on the environment. In Angular, we can use environment file for this purpose. But again the problem is we have to hard code the API URL in the environment file. In this post we will explore how we can do configure container environment variable in vanilla Javascript. This technique can be used in any Javascript framework or technology.

Continuous database deployments to Azure Sql Server with Bitbucket

August 12, 2023 by Anuraj

Azure DevOps Bitbucket AspNetCore EFCore

This post is about configuring continuous database deployments to Azure Sql Server with Bitbucket. We are deploying it using EF Core migrations. We can can modify the existing bit bitbucket-pipelines.yml file and add the following code.

Deploying ASP.NET Core applications to Azure App service from Bitbucket

August 09, 2023 by Anuraj

Azure DevOps Bitbucket AspNetCore

Bitbucket is a Git-based source code repository hosting service owned by Atlassian. Bitbucket offers both commercial plans and free accounts with an unlimited number of private repositories. In this post we will be exploring how to deploy an ASP.NET Core web application to Azure App service from Bitbucket. I already created an account in Bitbucket and after the creation I will be able to see a window like this.

Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub