跳转到主要内容
Chinese, Simplified

NET Framework是一个用于在Windows上构建和运行应用程序的软件开发框架。

.NET Framework是.NET平台的一部分,.NET平台是一组用于构建Linux、macOS、Windows、iOS、Android等应用程序的技术。

.NET and .NET Framework

.NET is a developer platform made up of toolsprogramming languages, and libraries for building many different types of applications.

There are various implementations of .NET. Each implementation allows .NET code to execute in different places—Linux, macOS, Windows, iOS, Android, and many more.

  1. .NET Framework is the original implementation of .NET. It supports running websites, services, desktop apps, and more on Windows.
  2. .NET is a cross-platform implementation for running websites, services, and console apps on Windows, Linux, and macOS. .NET is open source on GitHub. .NET was previously called .NET Core.
  3. Xamarin/Mono is a .NET implementation for running apps on all the major mobile operating systems, including iOS and Android.

.NET Standard is a formal specification of the APIs that are common across .NET implementations. This allows the same code and libraries to run on different implementations.

net Framework

.NET框架的体系结构

.NET Framework的两个主要组件是公共语言运行库和.NET Framework类库。

  • 公共语言运行库(CLR)是处理正在运行的应用程序的执行引擎。它提供诸如线程管理、垃圾收集、类型安全、异常处理等服务。
  • 类库为通用功能提供了一组API和类型。它提供字符串、日期、数字等的类型。类库包括用于读写文件、连接数据库、绘图等的API。

.NET应用程序是用C#、F#或Visual Basic编程语言编写的。代码被编译成与语言无关的通用中间语言(CIL)。编译后的代码存储在程序集中——文件扩展名为.dll或.exe的文件。

当应用程序运行时,CLR获取程序集,并使用实时编译器(JIT)将其转换为可以在其运行的计算机的特定体系结构上执行的机器代码。

Read more: What is the .NET Framework

Release history

Versions of .NET Framework available for download
Version Release date End of support
.NET Framework 4.8.1 August 9, 2022  
.NET Framework 4.8 April 18, 2019  
.NET Framework 4.7.2 April 30, 2018  
.NET Framework 4.7.1 October 17, 2017  
.NET Framework 4.7 April 5, 2017  
.NET Framework 4.6.2 August 2, 2016  
.NET Framework 3.5 SP1 November 18, 2008 January 9, 2029

.NET Framework FAQ

What is .NET Framework used for?

.NET Framework is used to create and run software applications. .NET apps can run on many operating systems, using different implementations of .NET. .NET Framework is used for running .NET apps on Windows.

Who uses .NET Framework?

Software developers and the users of their applications both use .NET Framework:

  • Users of applications built with the .NET Framework need to have .NET Framework installed. In most cases, .NET Framework is already installed with Windows. If needed, you can download .NET Framework.
  • Software developers use .NET Framework to build many different types of applications—websites, services, desktop apps, and more with Visual Studio. Visual Studio is an integrated development environment (IDE) that provides development productivity tools and debugging capabilities. See the .NET customer showcase for examples of what people are building with .NET.

Why do I need .NET Framework?

You need .NET Framework installed to run applications on Windows that were created using .NET Framework. It's already included in many versions of Windows. You only need to download and install .NET Framework if prompted to do so.

How does .NET Framework work?

.NET Framework applications are written in C#, F#, or Visual Basic and compiled to Common Intermediate Language (CIL). The Common Language Runtime (CLR) runs .NET applications on a given machine, converting the CIL to machine code. See Architecture of .NET Framework for more info.

What are the main components/features of .NET Framework?

The two major components of .NET Framework are the Common Language Runtime (CLR) and the .NET Framework Class Library. The CLR is the execution engine that handles running applications. The Class Library provides a set of APIs and types for common functionality. See Architecture of .NET Framework for more info.

What is the difference between .NET and .NET Framework?

.NET and .NET Framework share many of the same components and you can share code across the two. Some key differences include:

  • .NET is cross-platform and runs on Linux, macOS, and Windows. .NET Framework only runs on Windows.
  • .NET is open-source and accepts contributions from the community. The .NET Framework source code is available but doesn't take direct contributions.
  • All of the innovation happens in .NET.
  • .NET Framework is included in Windows and automatically updated machine-wide by Windows Update. .NET is shipped independently.

See .NET vs. .NET Framework for server apps for more details.

Can you have multiple .NET Frameworks installed?

Some versions of .NET Framework are installed side-by-side, while others will upgrade an existing version (known as an in-place update). In-place updates occur when two .NET Framework versions share the same CLR version.

For example, installing .NET Framework 4.8 on a machine with .NET Framework 4.7.2 and 3.5 installed will perform an in-place update of the 4.7.2 installation and leave 3.5 installed separately.

CLR version used by .NET Framework versions
.NET Framework version CLR version
.NET Framework 4.x 4.0
.NET Framework 2.x and 3.x 2.0
.NET Framework 1.1 1.1
.NET Framework 1.0 1.0

How much does .NET Framework cost?

.NET Framework is free, like the rest of the .NET platform. There are no fees or licensing costs, including for commercial use. See .NET is free for more details.

Which version of .NET Framework should I use?

In most cases, you should use the latest stable release. Currently, that's .NET Framework 4.8.1 .

Applications that were created with any 4.x version of .NET Framework will run on .NET Framework 4.8.1 . To run an application that was created for an earlier version (for example, .NET Framework 3.5), you should install that version. See Download .NET Framework for a complete list.

What is the support policy for .NET Framework?

.NET Framework 4.8.1 is the latest version of .NET Framework and will continue to be distributed with future releases of Windows. As long as it is installed on a supported version of Windows, .NET Framework 4.8.1 will continue to also be supported.

原文地址
https://dotnet.microsoft.com/en-us/learn/dotnet/what-is-dotnet-framework
本文地址
Article

微信

知识星球

微信公众号

视频号