The professional me!

Icon

technical thinking

What is .Net? How it works?

I meet many people who tell that they are working in .Net and they know .Net. But to my surprise they couldn’t answer most basic questions. I don’t believe in reading big theory books all the time. Unless you work on the specific technology you are anyways not going to get idea what it is all about and how it works. Also, at the time of working on any technology you should at least try to understand the way something works.

Here, I am listing some basic concepts of .Net and the way it works. The topic is really vast so, I would like to split this post in some parts. So, in this post I will write about .Net framework architecture. Hopefully you will get many answers of Why and How 🙂

What is .Net framework?

Intro:

Framework means a bunch of components integrated together so that one can develop applications using that. It contains reusable, extensible code libraries and a virtual machine where all supported languages can run.

Single platform and multiple languages: The amazing thing provided by .Net, you can actually work on many languages at the same time. There are two main advantages , you can use code written in C#.Net to your VB.Net application as well.  Second, you can develop C#.Net/ASP.net/ VB.Net/ J#.Net all applications on same platform, you don’t need anything else.

Isn’t it great thing? Now, the obvious question will be, how is it possible, right? So here are explanations..

How it is possible to use many languages using one framework:  The structure of .Net framework is the key. We have got the following architecture:

The image is taken from here

As you can see in the above diagram, we have all the code compiled and sent to Common Language Infrastructure for further processing. Common Language Infrastructure consists of CIL ( Common Intermediate Language ) and CLR (Common Language Runtime).

CIL: It convert all the code in this common language called Common Intermediate Language. What that means? For example, we have a double data type in C#.net and Decimal in VB.Net. Likewise , we have all the bunch of data types, functions and procedures in all the different languages supported by .net framework. There has to be something common where we can actually know what that means, the definition of all the data types, functions and procedures. The function of defining all these different languages in some standard language is performed by CIL.

CLR: Common Language Runtime converts CLI to machine readable language.

Every code is ultimately binary. So, creating these binary code is done by CLR.

So, these are basic things which come under .net framework.

**It is a framework not the language: There are many people who think it is a language, but it is not.

In the next post, I will be writing about what namespaces/ assembliies /dlls are? project file structure. How we can actually use code written in multiple languages.

Advertisements

Filed under: .Net, , ,

Visual Studio Setup & Deployment Project: “Unrecoverable Build Error”

After installing Visual Studio 2008, I was trying to build the setup project & I saw the error “Unrecoverable Build Error”, no information in other columns as file name, line number etc. I was wondering about the reason behind it & found following solution:
For setup & Deployment project, the error occures if mergemod.dll is not registered properly. To register the same run following command:
regsvr32 “C:\Program Files\Common Files\Microsoft Shared\MSI Tools\mergemod.dll”

Now, rebuild the project, it will work.

Filed under: .Net, Software, ,

Convert your project from .Net framework 3.5 to 2.0

When we open visual studio 2008 and create new project, .Net framework 3.5 is by default selected. Many times we really don’t require to write an application to run in .Net 3.5. So, the question arises How to convert the project from 3.5 to 2.0?

Solution:
1. Go to Project Properties.
2. Compile Tab-> Advanced compile Options->Target Framework ->select 2.0
3. It will ask for the confirmation about you can not use features of .Net framework 3.5. Say Yes.
4.After doing this restart the project.

Its done.

Note: After doing this you may get some errors for namespaces you have used from 3.5 framework. just remove them from code.

Filed under: .Net, Software, ,

VS 2008 Error-“This project type not supported” for C# project types

I got the error when I tried to open Visual Studio 2008, saying “This project type is not supported by this installation.” It was specifically for C#.Net projects, all other types of projects were getting opened.
Following steps need to be followed to solve this problem.

1. Open Visual Studio 2008 command prompt.
2. Type: regsvr32.exe “path of IDE Folder\projectaggregator.dll”. In my case it is
regsvr32.exe “D:\VS\Common7\IDE\projectaggregator.dll”
3. Then type D:\VS\Common7\IDE\devenv /setup

It is all done. Now, close command prompt and start your Visual Studio 2008. All projects will get open.

Filed under: .Net, Software, ,

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,087 other followers

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,087 other followers

Top Rated

Me on Twitter..

Error: Twitter did not respond. Please wait a few minutes and refresh this page.