Posts

Showing posts from October, 2024

Setup dotnet development in Visual Studio, dotnet CLI and VS code

Image
dotnet_setup Install dotnet Download and install dotnet sdk from https://dotnet.microsoft.com/en-us/download Verify dotnet version with the command dotnet --version Solution and Projects in dotnet Project is a C# application. It is defined by a .csproj file Solution is a collection of multiple projects. It is defined using a .sln file A simple C# solution folder structure can be as follows ConsoleAppSolution │ ConsoleAppSolution.sln │ ├───ConsoleApp1 │ ConsoleApp1.csproj │ Program.cs │ └───ConsoleApp2 ConsoleApp2.csproj Program.cs Development with Visual studio Download and install visual studio from https://visualstudio.microsoft.com/downloads/ Open Visual studio and select “Create New Project” Select project type as “Console Application” Enter the solution name and project name Select the dotnet version Now a solution is created in visual studio as shown below Development with dotnet CLI dotnet C

Introduction to dotnet with a simple hello world example

Image
dotnet_intro Introduction to dotnet with a simple hello world example What is dotnet Dotnet is an ecosystem or a framework that consists of languages, runtime (CLR), common language infrastructure (CLI), base class libraries (BCL) CLR is like JVM for Java applications Where can dotnet run dotnet can run on multiple operating systems like windows, linux based systems, android, macOS Why use Dotnet Using Dotnet, we can create secure, cross-platform, enterprise grade, high performance, maintainable, reusable, testable, easily hostable web applications We can exploit the rich open source .NET ecosystem that has been around for decades and still actively maintained by community and Microsoft .NET uses C# language which is best for creating readable and maintainable code. C# is evolving faster to become more powerful due to open source community thereby increasing the developer friendliness and productivity Common Dotnet Frameworks Dotnet has framewo