Skip to content

.Net Framework Basics

Posted on:August 23, 2023 at 05:54 PM

C#

Untitled.png

Language interoperability is a key feature of .NET. IL code produced by the C# compiler conforms to the Common Type Specification (CTS). IL code generated from C# can interact with code that was generated from the .NET versions of F#, Visual Basic, C++. There are more than 20 other CTS-compliant languages. A single assembly may contain multiple modules written in different .NET languages. The types can reference each other as if they were written in the same language.

Runtime = Compiler + Executor

.Net

Execution system of C#

.Net implementations

Common Composition

Each implementation of .NET includes the following components:

- One or more runtimes—for example, .NET Framework CLR and .NET 5 CLR.
- A class library—for example, .NET Framework Base Class Library and .NET 5 Base Class Library.
- Optionally, one or more application frameworks—for example, [ASP.NET](https://www.asp.net/), [Windows Forms](https://docs.microsoft.com/en-us/dotnet/desktop/winforms/windows-forms-overview), and [Windows Presentation Foundation (WPF)](https://docs.microsoft.com/en-us/dotnet/desktop/wpf/) are included in .NET Framework and .NET 5+.
- Optionally, development tools. Some development tools are shared among multiple implementations.

.Net class library

DotNet

  1. .Net Framework

    only supplied in Windows

  2. .Net Core

    • composed of
      • A .NET runtime, which provides a type system, assembly loading, a garbage collector, native interop and other basic services.

      • A set of framework libraries, which provide primitive data types, app composition types and fundamental utilities.

      • A set of SDK tools and language compilers that enable the base developer experience, available in the .NET Core SDK.

      • The ‘dotnet’ app host, which is used to launch .NET Core apps. It selects the runtime and hosts the runtime, provides an assembly loading policy and launches the app. The same host is also used to launch SDK tools in much the same way.

    .Net SDK is based on .Net standards, refactor system apis across Linux, Windows and MacOS into a prescribed api list.
    .Net standards is a formal specification of the APIs that are common across all the .NET implementation on various systems.

Untitled.png

  1. Xamarin/Mono

    Framework for mobile development

2. .Net Development in VSCode

OmniSharp IntelliSense Tools

Roslyn .NET Compiler Platform

bookmark

https://github.com/dotnet/roslyn

3. .Net Project

💡 - How to organize .Net project?

  • What is solution file?
  • Is solution file designed for .Net project or it is that .Net is following solution file principle?

A solution is a collection of projects.

3.1 Solution file

A solution is a grouping of one or more projects that work together to create an application.

3.2 Project file

csproj