.NET Framework
Developer(s) | Microsoft |
---|---|
Initial release | February 13, 2002 |
Stable release | 4.8.1
/ August 9, 2022[1] |
ARM | |
Included with | Microsoft Windows |
Successor | .NET |
Type | Software framework |
License | Mixed; see § Licensing |
Website | dotnet |
The .NET Framework (pronounced as "dot net") is a proprietary
FCL provides the
.NET Framework began as proprietary software, although the firm worked to standardize the software stack almost immediately, even before its first release. Despite the standardization efforts, developers, mainly those in the free and open-source software communities, expressed their unease with the selected terms and the prospects of any free and open-source implementation, especially regarding software patents. Since then, Microsoft has changed .NET development to more closely follow a contemporary model of a community-developed software project, including issuing an update to its patent promising to address the concerns.[2]
In April 2019, Microsoft released .NET Framework 4.8, the last major version of the framework as a proprietary offering, followed by .NET Framework 4.8.1 in August 2022. Only monthly security and reliability bug fixes to that version have been released since then. No further changes to that version are planned. The .NET Framework will continue to be included with future releases of Windows and continue to receive security updates, with no plans to remove it as of November 2023.[3]
History
Microsoft began developing .NET Framework in the late 1990s, originally under the name of Next Generation Windows Services (NGWS), as part of the
In August 2000, Microsoft, and Intel worked to standardize Common Language Infrastructure (CLI) and C#. By December 2001, both were ratified ECMA standards.[4][5] International Organization for Standardization (ISO) followed in April 2003. The current version of ISO standards are ISO/IEC 23271:2012 and ISO/IEC 23270:2006.[6][7]
While Microsoft and their partners hold patents for CLI and C#, ECMA and ISO require that all patents essential to implementation be made available under "reasonable and non-discriminatory terms". The firms agreed to meet these terms, and to make the patents available royalty-free. However, this did not apply to the part of the .NET Framework not covered by ECMA-ISO standards, which included Windows Forms, ADO.NET, and ASP.NET. Patents that Microsoft holds in these areas may have deterred non-Microsoft implementations of the full framework.[8]
Windows Vista is the first client version of Windows that integrated the .NET Framework.
On October 3, 2007, Microsoft announced that the
The
In November 2014, Microsoft also produced an update to its patent grants, which further extends the scope beyond its prior pledges. Prior projects like Mono existed in a legal grey area because Microsoft's earlier grants applied only to the technology in "covered specifications", including strictly the 4th editions each of ECMA-334 and ECMA-335. The new patent promise, however, places no ceiling on the specification version, and even extends to any .NET runtime technologies documented on MSDN that have not been formally specified by the ECMA group, if a project chooses to implement them. This allows Mono and other projects to maintain feature parity with modern .NET features that have been introduced since the 4th edition was published without being at risk of patent litigation over the implementation of those features. The new grant does maintain the restriction that any implementation must maintain minimum compliance with the mandatory parts of the CLI specification.[11]
On March 31, 2016, Microsoft announced at
Microsoft's press release highlights that the cross-platform commitment now allows for a fully open-source, modern server-side .NET stack. Microsoft released the source code for WPF, Windows Forms and WinUI on December 4, 2018.[16]
Architecture
Common Language Infrastructure
Common Language Infrastructure (CLI) provides a language-neutral platform for application development and execution. By implementing the core aspects of .NET Framework within the scope of CLI, these functions will not be tied to one language but will be available across the many languages supported by the framework.
Common Language Runtime
.NET Framework includes the Common Language Runtime (CLR). It serves as the execution engine of .NET Framework and offers many services such as
Programs written for .NET Framework are compiled into
Assemblies
Compiled CIL code is stored in
A private key can also be used by the creator of the assembly for
Starting with Visual Studio 2015, .NET Native compilation technology allows for the compilation of .NET code of Universal Windows Platform apps directly to machine code rather than CIL code, but the app must be written in either C# or Visual Basic.NET.[17]
Class library
.NET Framework includes an implementation of the CLI foundational
BCL includes a small subset of the entire class library and is the core set of classes that serve as the basic
FCL refers to the entire class library that ships with .NET Framework. It includes BCL, an expanded set of libraries, including
With the introduction of alternative CLI's implementations (e.g., Silverlight), Microsoft introduced the concept of Portable Class Libraries (PCL) allowing a consuming library to run on more than one implementation. With the further proliferation of implementations, the PCL approach failed to scale (PCLs are defined intersections of API surface between two or more implementations).[19] As the next evolutionary step of PCL, the .NET Standard Library was created retroactively based on the System.Runtime.dll
based APIs found in UWP and Silverlight. New CLI's implementations are encouraged to implement a version of the Standard Library allowing them to run existent third-party libraries with no need of creating new versions of them. The .NET Standard Library allows an independent evolution of the library and app model layers within the .NET architecture.[20]
NuGet is the package manager for all .NET platforms. It is used to retrieve third-party libraries into a .NET project with a global library feed at NuGet.org.[21] Private feeds can be maintained separately, e.g., by a build server or a file system directory.
C++/CLI
Microsoft introduced
Assemblies compiled using the C++/CLI compiler are termed mixed-mode assemblies since they contain native and managed code in the same DLL.
Design principle
Interoperability
Because computer systems commonly require interaction between newer and older applications, .NET Framework provides means to access functions implemented in newer and older programs that execute outside .NET environment. Access to Component Object Model (COM) components is provided in System.Runtime.InteropServices
and System.EnterpriseServices
namespaces of the framework. Access to other functions is via Platform Invocation Services (P/Invoke). Access to .NET functions from native applications is via the reverse P/Invoke function.
Language independence
.NET Framework introduces a Common Type System (CTS) that defines all possible data types and programming constructs supported by CLR and how they may or may not interact conforming to CLI specifications. Because of this feature, .NET Framework supports the exchange of types and object instances between libraries and applications written using any conforming CLI language.
Type safety
CTS and the CLR used in .NET Framework also enforce type safety. This prevents ill-defined casts, wrong method invocations, and memory size issues when accessing an object. This also makes most CLI languages statically typed (with or without type inference). However, starting with .NET Framework 4.0, the Dynamic Language Runtime extended the CLR, allowing dynamically typed languages to be implemented atop the CLI.
Portability
While Microsoft has never implemented the full framework on any system except Microsoft Windows, it has engineered the framework to be cross-platform,[23] and implementations are available for other operating systems (see Silverlight and § Alternative implementations). Microsoft submitted the specifications for CLI (which includes the Base Class Libraries, CTS, and CIL),[24][25][26] C#,[5] and C++/CLI[27] to both Ecma International (ECMA) and International Organization for Standardization (ISO), making them available as official standards. This makes it possible for third parties to create compatible implementations of the framework and its languages on other platforms.
Core cross-platform .NET (formerly .NET Core) is officially available also for many Linux distributions and MacOS.[28]
Security
.NET Framework has its own security mechanism with two general features: Code Access Security (CAS), and validation and verification. CAS is based on evidence that is associated with a specific assembly. Typically the evidence is the source of the assembly (whether it is installed on the local machine or has been downloaded from the Internet). CAS uses evidence to determine the permissions granted to the code. When calling code demands that it be granted a specific permission, CLR performs a call stack walk checking every assembly of each method in the call stack for the required permission; if any assembly is not granted the permission, it will throw a security exception.
Memory management
CLR frees the developer from the burden of managing memory (allocating and freeing up when done); it handles memory management itself by detecting when memory can be safely freed. Instantiations of .NET types (objects) are allocated from the managed heap; a pool of memory managed by CLR. As long as a reference to an object exists, which may be either direct, or via a
.NET Framework includes a
The garbage collector used by .NET Framework is also generational.[34] Objects are assigned a generation. Newly created objects are tagged Generation 0. Objects that survive one garbage collection are tagged Generation 1. Generation 1 objects that survive another collection are Generation 2. The framework uses up to Generation 2 objects.[34] Higher generation objects are garbage collected less often than lower generation objects. This raises the efficiency of garbage collection, as older objects tend to have longer lifetimes than newer objects.[34] By ignoring older objects in most collection runs, fewer checks and compaction operations are needed in total.[34]
Performance
When an application is first launched, the .NET Framework compiles the
The garbage collector, which is integrated into the environment, can introduce unanticipated delays of execution over which the developer has little direct control. "In large applications, the number of objects that the garbage collector needs to work with can become very large, which means it can take a very long time to visit and rearrange all of them."[37]
.NET Framework provides support for calling
Alternative implementations
.NET Framework was the predominant implementation of CLI, until the release of .NET. Other implementations for parts of the framework exist. Although the runtime engine is described by an ECMA-ISO specification, other implementations of it may be encumbered by patent issues; ISO standards may include the disclaimer, "Attention is drawn to the possibility that some of the elements of this document may be the subject of patent rights. ISO shall not be held responsible for identifying any or all such patent rights."[42] It is harder to develop alternatives to FCL, which is not described by an open standard and may be subject to copyright restrictions. Also, parts of FCL have Windows-specific functions and behavior, so implementation on non-Windows platforms can be problematic.
Some alternative implementations of parts of the framework are listed here.
- GUIframework loosely based on WPF, and additional libraries specific to embedded applications.
- Mono is an implementation of CLI and FCL, and provides added functions. It is licensed as free software under the MIT License. It includes support for ASP.NET, ADO.NET, and Windows Forms libraries for a wide range of architectures and operating systems. It also includes C# and VB.NET compilers.
- Portable.NET (part of DotGNU) provides an implementation of CLI, parts of FCL, and a C# compiler. It supports a variety of CPUs and operating systems. The project was discontinued, with the last stable release in 2009.
- Microsoft non-freeimplementation of CLR. However, the last version runs on Windows XP SP2 only, and has not been updated since 2006. Thus, it does not contain all features of version 2.0 of .NET Framework.
- CrossNet[44] is an implementation of CLI and parts of FCL. It is free software using an open source MIT License.
Licensing
Microsoft managed code frameworks and their components are licensed as follows:
Component | License |
---|---|
.NET Framework (redistributable package) | Proprietary software[45] |
Reference source code of .NET Framework 4.5 and earlier | |
Reference source code of .NET Framework 4.6 | MIT License[47] |
Mono | MIT License[15] |
.NET (formerly .NET Core) CoreFX, CoreCLR and CLI |
MIT License[48] |
.NET Micro Framework | Apache License 2.0[49]
|
.NET Compiler Platform (codename "Roslyn")
|
MIT License[50] |
ASP.NET MVC, Web API and Web Pages (Razor) | Apache License 2.0[51] |
ASP.NET Core | Apache License 2.0[52] |
ASP.NET Ajax Control Toolkit | BSD License[53]
|
ASP.NET SignalR
|
Apache License 2.0[54] |
Entity Framework | Apache License 2.0[55] |
NuGet | Apache License 2.0[56] |
See also
- Microsoft Foundation Class Library (MFC), an object-oriented abstraction used to ease Windows-based application programming prior to .NET Framework
- .NET (formerly .NET Core)
- List of CLI languages
- Standard Libraries (CLI), the .NET standard libraries
- Base Class Library(BCL)
Notes
- ^ Microsoft Reciprocal License.
- ^ Dotfuscator Community Edition 4.0
References
- ^ "Download .NET Framework 4.8 Offline Installer". Microsoft. Archived from the original on August 15, 2019. Retrieved August 15, 2019.
- ^ Ibanez, Luis (November 19, 2014). "Microsoft gets on board with open source". Opensource.com. Retrieved January 2, 2020.
- ^ gewarren. ".NET Framework & Windows OS versions". Microsoft Learn. Retrieved November 21, 2020.
- ^ "Standard ECMA-335: Common Language Infrastructure (CLI)" (6 ed.). ECMA. June 2012. Archived from the original on June 29, 2013. Retrieved August 31, 2005.
- ^ a b "Standard ECMA-334: C# Language Specification" (4 ed.). ECMA. June 2006. Archived from the original on October 31, 2010. Retrieved August 31, 2005.
- ^ "ISO/IEC 23271:2012 Information technology – Common Language Infrastructure" (3 ed.). International Organization for Standardization. February 13, 2012.
- ^ "ISO/IEC 23270:2006 – Information technology – Programming languages – C#" (2 ed.). International Organization for Standardization. January 26, 2012. Archived from the original on December 6, 2010. Retrieved April 1, 2008.
- ^ Smith, Brett (16 July 2009). "Microsoft's Empty Promise". Free Software Foundation. Archived from the original on August 19, 2009. Retrieved August 3, 2009.
However, there are several libraries that are included with Mono, and commonly used by applications like Tomboy, that are not required by the standard. And just to be clear, we're not talking about Windows-specific libraries like ASP.NET and Windows Forms. Instead, we're talking about libraries under the System namespace that provide common functionality programmers expect in modern programming languages
- ^ a b Guthrie, Scott (3 October 2007). "Releasing the Source Code for the NET Framework". Scott Guthrie's Blog. Microsoft. Archived from the original on September 7, 2010. Retrieved September 15, 2010.
- ^ Guthrie, Scott (January 16, 2008). ".NET Framework Library Source Code now available". Scott Guthrie's Blog. Microsoft. Retrieved February 28, 2015.
- ^ "Microsoft Patent Promise for .NET Libraries and Runtime Components". GitHub. Archived from the original on February 21, 2021. Retrieved November 16, 2014.
- IDG.
- ^ Ferraira, Bruno (March 31, 2016). "Xamarin now comes free with Visual Studio". The Tech Report. Archived from the original on April 2, 2016. Retrieved April 12, 2016.
- ^ "Microsoft Patent Promise for Mono". Mono on GitHub. 28 March 2016. Archived from the original on April 16, 2016. Retrieved April 16, 2016.
- ^ a b Friedman, Nat (March 31, 2016). "Xamarin for Everyone". Xamarin Blog. Archived from the original on April 12, 2016. Retrieved April 12, 2016.
- ^ Gallo, Kevin (December 4, 2018). "Announcing Open Source of WPF, Windows Forms, and WinUI at Microsoft Connect 2018". Windows Developer Blog. Microsoft. Archived from the original on December 15, 2018. Retrieved December 24, 2018.
- ^ rpetrusha. "Compiling Apps with .NET Native". Microsoft Learn. Archived from the original on December 3, 2017. Retrieved December 2, 2017.
- ^ "Base Class Libraries Community". Microsoft. Archived from the original on April 24, 2009. Retrieved June 1, 2008.
- ^ ".NET Platform Standard". GitHub. Archived from the original on May 19, 2016. Retrieved April 23, 2016.
- ^ "An update on ASP.NET Core 1.0 RC2". Scott Hanselman. April 14, 2016. Retrieved April 23, 2016.
- ^ "NuGet Gallery – Home". nuget.org. Archived from the original on February 21, 2021. Retrieved February 21, 2021.
- ^ Mixed (Native and Managed) Assemblies Archived October 22, 2014, at the Wayback Machine, MSDN
- Channel 9. 30 April 2007. Archivedfrom the original on May 22, 2015. Retrieved April 16, 2016.
- ^ "ECMA 335 – Standard ECMA-335 Common Language Infrastructure (CLI) 4th edition (June 2006)". ECMA. June 1, 2006. Archived from the original on June 14, 2008. Retrieved June 1, 2008.
- ^ "ISO/IEC 23271:2006". ISO Standards. September 29, 2006. Archived from the original on July 1, 2018. Retrieved April 17, 2012.
- ^ "Technical Report TR/84 Common Language Infrastructure (CLI) – Information Derived from Partition IV XML File". ECMA. 1 June 2006. Archived from the original on March 7, 2015. Retrieved April 16, 2016.
- ^ "Standard ECMA-372 C++/CLI Language Specification". ECMA. December 1, 2005. Archived from the original on August 10, 2008. Retrieved January 16, 2008.
- ^ ".NET Goes Cross-Platform with .NET Core".
- ^ Gartner, Inc. as reported in "Hype Cycle for Cyberthreats, 2006", September 2006, Neil MacDonald; Amrit Williams, et al.
- ^ Cifuentes, Cristina (July 1994). "6: Control Flow Analysis" (PDF). Reverse Compilation Techniques (Thesis). Queensland University of Technology. Archived from the original (PDF) on 22 November 2016.
- ^ a b c "Garbage Collection: Automatic Memory Management in the Microsoft .NET Framework". Archived from the original on July 3, 2007. Retrieved June 1, 2008.
- ^ a b c "Garbage collection in .NET". Archived from the original on May 25, 2008. Retrieved June 1, 2008.
- ^ "The .NET Framework 4.5 includes new garbage collector enhancements for client and server apps". July 20, 2012. Retrieved October 2, 2015.
- ^ a b c d "Garbage Collection—Part 2: Automatic Memory Management in the Microsoft .NET Framework". Archived from the original on June 26, 2007. Retrieved June 1, 2008.
- ^ "Understanding .NET Just-In-Time Compilation". telerik.com. May 28, 2013. Archived from the original on June 11, 2013. Retrieved May 21, 2015.
- ^ a b Compiling MSIL to Native Code Archived April 19, 2015, at the Wayback Machine, MSDN, Microsoft
- ^ "Understanding Garbage Collection in .NET". June 17, 2009.
- ^ "Release Notes Mono 2.2 – Mono". mono-project.com.
- ^ de Icaza, Miguel (November 3, 2008). "Mono's SIMD Support: Making Mono safe for Gaming". Tirania.org. Archived from the original on November 4, 2010. Retrieved April 17, 2012.
- ^ de Icaza, Miguel (November 3, 2008). "Mono's SIMD Support: Making Mono safe for Gaming". tirania.org. Retrieved May 6, 2022.
- ^ "SIMD-accelerated types in .NET". Microsoft Learn. Retrieved May 6, 2022.
- ^ ISO 9001:2008, Foreword
- ^ Fairbairn, Christopher (April 1, 2008). "Using VB.NET with the .NET Micro Framework «/dev/mobile". /dev/mobile. Archived from the original on February 27, 2018. Retrieved April 17, 2012.
- ^ "CrossNet". Codeplex.com. Archived from the original on January 25, 2010. Retrieved April 17, 2012.
- from the original on April 2, 2015. Retrieved February 28, 2015.
- ^ Bray, Brandon (August 15, 2012). "Announcing the release of .NET Framework 4.5 RTM – Product and Source Code". .NET Framework Blog. Microsoft. Archived from the original on October 4, 2016. Retrieved August 18, 2016.
- ^ "Announcing .NET 2015 Preview: A New Era for .NET". .NET Framework Blog. Microsoft. November 12, 2014. Archived from the original on August 19, 2016. Retrieved August 18, 2016.
- ^ ".NET Core 5". dotnetfoundation.org. .NET Foundation. Archived from the original on 17 February 2015. Retrieved 17 February 2015.
- ^ ".NET Micro Framework". dotnetfoundation.org. .NET Foundation. Archived from the original on 17 February 2015. Retrieved 17 February 2015.
- ^ "Roslyn License". GitHub. .NET Foundation. February 5, 2020. Archived from the original on March 24, 2018. Retrieved April 14, 2018.
- ^ "ASP.NET MVC, Web API and Web Pages (Razor)". dotnetfoundation.org. .NET Foundation. Archived from the original on 17 February 2015. Retrieved 17 February 2015.
- ^ "ASP.NET Core License". GitHub. .NET Foundation. July 5, 2017. Archived from the original on February 21, 2021. Retrieved April 14, 2018.
- ^ "ASP.NET Ajax Control Toolkit". dotnetfoundation.org. .NET Foundation. Archived from the original on 17 February 2015. Retrieved 17 February 2015.
- ^ "ASP.NET SignalR". dotnetfoundation.org. .NET Foundation. Archived from the original on 17 February 2015. Retrieved 17 February 2015.
- ^ "Entity Framework". dotnetfoundation.org. .NET Foundation. Archived from the original on 18 April 2016. Retrieved 16 April 2016.
- ^ "NuGet". dotnetfoundation.org. .NET Foundation. Archived from the original on 17 February 2015. Retrieved 17 February 2015.