66 out of 132 rated this helpful Rate this topic

.NET Framework Conceptual Overview

Help us create the documentation that's most important to you!

Take this short, anonymous survey (10 to 15 minutes) to rank the importance of tasks that you perform when you use Microsoft developer technologies. Your feedback will help us create MSDN documentation that meets your needs. To provide feedback, go to the survey page. Thanks in advance!

The .NET Framework is an integral Windows component that supports building and running the next generation of applications and XML Web services. The .NET Framework is designed to fulfill the following objectives:

  • To provide a consistent object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.

  • To provide a code-execution environment that minimizes software deployment and versioning conflicts.

  • To provide a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party.

  • To provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments.

  • To make the developer experience consistent across widely varying types of applications, such as Windows-based applications and Web-based applications.

  • To build all communication on industry standards to ensure that code based on the .NET Framework can integrate with any other code.

The .NET Framework has two main components: the common language runtime and the .NET Framework class library. The common language runtime is the foundation of the .NET Framework. You can think of the runtime as an agent that manages code at execution time, providing core services such as memory management, thread management, and remoting, while also enforcing strict type safety and other forms of code accuracy that promote security and robustness. In fact, the concept of code management is a fundamental principle of the runtime. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. The class library, the other main component of the .NET Framework, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line or graphical user interface (GUI) applications to applications based on the latest innovations provided by ASP.NET, such as Web Forms and XML Web services.

The .NET Framework can be hosted by unmanaged components that load the common language runtime into their processes and initiate the execution of managed code, thereby creating a software environment that can exploit both managed and unmanaged features. The .NET Framework not only provides several runtime hosts, but also supports the development of third-party runtime hosts.

For example, ASP.NET hosts the runtime to provide a scalable, server-side environment for managed code. ASP.NET works directly with the runtime to enable ASP.NET applications and XML Web services, both of which are discussed later in this topic.

Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to Microsoft® ActiveX® controls) possible, but with significant improvements that only managed code can offer, such as semi-trusted execution and isolated file storage.

The following illustration shows the relationship of the common language runtime and the class library to your applications and to the overall system. The illustration also shows how managed code operates within a larger architecture.

.NET Framework in context

Managed code within a larger architecture

The following sections describe the main components and features of the .NET Framework in greater detail.

The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime.

With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer). This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application.

The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature rich.

The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety.

In addition, the managed environment of the runtime eliminates many common software issues. For example, the runtime automatically handles object layout and manages references to objects, releasing them when they are no longer being used. This automatic memory management resolves the two most common application errors, memory leaks and invalid memory references.

The runtime also accelerates developer productivity. For example, programmers can write applications in their development language of choice, yet take full advantage of the runtime, the class library, and components written in other languages by other developers. Any compiler vendor who chooses to target the runtime can do so. Language compilers that target the .NET Framework make the features of the .NET Framework available to existing code written in that language, greatly easing the migration process for existing applications.

While the runtime is designed for the software of the future, it also supports software of today and yesterday. Interoperability between managed and unmanaged code enables developers to continue to use necessary COM components and DLLs.

The runtime is designed to enhance performance. Although the common language runtime provides many standard runtime services, managed code is never interpreted. A feature called just-in-time (JIT) compiling enables all managed code to run in the native machine language of the system on which it is executing. Meanwhile, the memory manager removes the possibilities of fragmented memory and increases memory locality-of-reference to further increase performance.

Finally, the runtime can be hosted by high-performance, server-side applications, such as Microsoft® SQL Server™ and Internet Information Services (IIS). This infrastructure enables you to use managed code to write your business logic, while still enjoying the superior performance of the industry's best enterprise servers that support runtime hosting.

The .NET Framework class library is a collection of reusable types that tightly integrate with the common language runtime. The class library is object oriented, providing types from which your own managed code can derive functionality. This not only makes the .NET Framework types easy to use, but also reduces the time associated with learning new features of the .NET Framework. In addition, third-party components can integrate seamlessly with classes in the .NET Framework.

For example, the .NET Framework collection classes implement a set of interfaces that you can use to develop your own collection classes. Your collection classes will blend seamlessly with the classes in the .NET Framework.

As you would expect from an object-oriented class library, the .NET Framework types enable you to accomplish a range of common programming tasks, including tasks such as string management, data collection, database connectivity, and file access. In addition to these common tasks, the class library includes types that support a variety of specialized development scenarios. For example, you can use the .NET Framework to develop the following types of applications and services:

For example, the Windows Forms classes are a comprehensive set of reusable types that vastly simplify Windows GUI development. If you write an ASP.NET Web Form application, you can use the Web Forms classes.

Did you find this helpful?
(2000 characters remaining)
Community Content Add
Annotations FAQ
hilite is developed by us
note that weare not using hilite tool as pointed by you... this tool is developed by us and it is used in avionics domain...
for automatic test case generation
Thanks for the clarification.

Please note that we have a tool called HiLiTE this tool gives exception when we have multiple versions of .Net Framework. the tool works with .net framework version 2.0. but later versions gives problems.

Error: String format error.

also note that when you says that all .net frameworks versions are backward compatible then do we need to maintain only one(latest) .net version in our pc?

One or Multiple Versions?

Assuming that you're using the Hilite that's downloadable from http://www.raboof.com/Projects/Hilite/, I experienced no difficulty with it on a system that has multiple versions of the .NET Framework installed. So I'm not quite sure what the problem may be.

By default, an application will run against the version of the .NET Framework with which it was built. In some cases, if that version is not present and the application's configuration file does not specify an alternate version, an exception is thrown and the application cannot execute. So although the .NET Framework maintains a high degree of backward compatibility from version to version, it nevertheless is best to leave all installed versions of the .NET Framework on a system to ensure that all existing applications continue to work as expected.

--Ron Petrusha
Common Language Runtime User Education
Microsoft Corporation

Please let me know why different .Net framework versions are not backward compatible?

Please let me know why different .Net framework versions are not backward compatible?
Thanks Patodi

Backward Compatibility in the .NET Framework


Backward compatibility means that an application developed for a .NET Framework version will run without modification on later .NET Framework versions. (See http://msdn.microsoft.com/en-us/library/ff602939.aspx.) Typically, source code that compiles under a compiler that targets one version of the .NET Framework will successfully compile under later versions, and binaries that target and run under one version of the .NET Framework will not only run but produce identical behavior under later versions. So the .NET Framework maintains an extremely high level of backward compatibilty.

What is it that leads you to conclude otherwise, Patodi?

--Ron Petrusha
Common Language Runtime User Education
Microsoft Corporation

.NET on WinXP etc.
In brief, if you have ever tried to install and application that incorporates Internet Explorer or other applications, you need to have the .NET platform installed for it to work correctly. In addition, When a program is compiled into an intermediate architecture-independent language called Microsoft Intermediate Language that are written in C# and VB.NET. The compiled files have an extension of .EXE or .DLL and by installing .NET it can run the programs developed to run on the .NET Framework.

I hope I wrote this so its understandable.
Bugs in .Net Application

What are the Common functional bugs applicable in the .NET developed Application?
Each time I start windows I get a message saying that Microsoft.NET Framework 2.0 is not installed

Getting Help with Error Messages


From the brief description, it seems likely that your system is configured to run an application on startup that was built using the .NET Framework Version 2.0. But it's best to use the Microsoft Forums to get help with issues such as these. You might try the .NET Framework Setup forum at http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/threads.

--Ron Petrusha
Common Language Runtime User Education
Microsoft Corporation

Editing my C Drive content

I am a home user running Windows XP with the current Firefox browser. As I have limited space on my C Drive I am reviewing the need for some of my larger programs.  Four of these are as follows:

.Net 2.0 ,
.Net 3.0 ,
Office 2000 SR1-Professional,
Office 2000 Disc 2

Each of these is between 159 and 201 MB. Are all 4 needed for home use? Do I need both Net 2 and Net3? Please comment.

Removing the .NET Framework 2.0 and the .NET Framework 3.0


It's safe to remove a specific version of the .NET Framework only if you're certain that no applications or utilities that are installed on your system target that version. On the other hand, if you remove a version of the .NET Framework that is targeted by an application, that application will fail. So unless you're certain that a particular version of the .NET Framework is not used by any applications, the best advice is to leave it on your system.

--Ron Petrusha
Common Language Runtime Developer Content
Microsoft Corporation

lost framework

I keep getting a message that NET. Framework 2.0 is needed on my laptop but when i try to download it to my computer I get a message that it is already installed as a part of my operating system. Did I accidentally disable it?????

Use the Microsoft Forums


It is best to post questions about difficulties that you are having with .NET Frameowrk installation in the Microsoft Forums. I suspect that the .NET Framework Setup forum is most relevant to your issue. Its URL is http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/threads.

--Ron Petrusha
Common Language Runtime Developer Content
Microsoft Corporation

Error- Object reference not set to an instance of object
I am using an application that requires .Net 2.0.$0 $0Sometimes, After I  save a file and I try to retrieve it using this application I get this Run-time error "Object reference not set to an instance of object".$0 $0It occurred on some desktops/laptops, but I could not figure it out?$0 $0Can this be caused by viruses ?$0 $0regards,$0
3rd party DLL and Library support with .net 4.0
Hi,

I have recently migrated to .Net 4.0 and I am working on ASP.net web applications. I would like to know what are the 3rd party components/libraries which .net 4.0 supports.

Thanks,
downgrading issues

I use a turbo apps program that apparently cannot run .net 4.0. I was told to remove the program and load 3.5 service pack. This will not install on my laptop at all. I really need to get an idea as to what I must do to make this work so I can sync my phone. NOBODY seems to know what to do. Any ideas on this?

Use the Microsoft Forums

It is best to post questions about difficulties that you are having with .NET Frameowrk installation in the Microsoft Forums. I suspect that the .NET Framework Setup forum is most relevant to your issue. Its URL is http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/threads.

--Ron Petrusha
Common Language Runtime Developer Content
Microsoft Corporation

Access & The Web site (Web Expressions 3

I am trying to build a website that uses MS Access as it's data base. I also own Web Expressions 3, but cannot link the two.
I can build the site in Web 3, but cannot ask for customer name and address to save in Access.

What am I missing or what do I need to link the two?

Use the Microsoft Forums!

It's best to post questions about difficulties that you are having with Microsoft Expression in the Microsoft Forums. The URL of the forum for Microsoft Expression is http://social.expression.microsoft.com/Forums/en-US/web/threads/.

--Ron Petrusha
Common Language Runtime Developer Content
Microsoft Corporation

What is the main Purpose?

I would like information as to what is the main purpose for Microsoft Net Framework usage for on the Windows XP computer?


It's so programs written for it can run on your computer. It doesn't do any harm or slow down anything, and if you get a .Net program, you're ready to go. -Tagus

Purpose

If I have no intention of developing other programs, do I need .NET and what happens if I remove 1.1, 2.0?

The Purpose of .NET

The .NET Framework is an operating environment that provides basic services (such as memory management, garbage collection, a common type system, and a class library) to all applications that target the .NET Framework. This means that it is not only for developers. Developers are responsible for developing applications that target the .NET Framework. But the applications that they develop also require the presence of the .NET Framework in order to run successfully. This means that, if you remove a particular version of the .NET Framework and you have applications that target that version, your applications will no longer work.

I hope that this helps to answer your question.

--Ron Petrusha
Common Language Runtime Developer Content Team
Microsoft Corporation