Tips n Tracks

  • Increase font size
  • Default font size
  • Decrease font size
  • default color
  • black color

Reference

Sample image

Microsoft .NET Framework Get Details.

Sample image

Microsoft .NET Framework Get Details.

Reference

Sample image Microsoft .NET Framework Get Details.
Sample image

Microsoft .NET Framework Get Details.


Archive for October, 2009

What is the Microsoft .NET Framework 3.0?


The Microsoft .NET Framework 3.0 (formerly known WinFX), is the new managed code programming model for Windows. .NET Framework 3.0 is combines the power of the .NET Framework 2.0 with four new technologies:

  • Windows Presentation Foundation (WPF).
  • Windows Communication Foundation (WCF).
  • Windows Workflow Foundation (WF).
  • Windows CardSpace (WCS, formerly “InfoCard”).

 

Explain Microsoft intermediate language (MSIL) Assembler?


MSIL Assembler (Ilasm.exe) is a command line tool provides by .Net. The MSIL Assembler generates a portable executable (PE) file from MSIL assembly language. You can run the resulting executable, which contains MSIL and the required metadata, to determine whether the MSIL performs as expected.

Syntax
ilasm [options] filename [[options]filename…]
Parameters
filename The name of the .il source file. This file consists of metadata declaration directives and symbolic MSIL instructions.Multiple source file arguments can be supplied to produce a single PE file with Ilasm.exe.
options
/alignment=integer Sets FileAlignment to the value specified by integer in the NT Optional header.
/base=integer Sets ImageBase to the value specified by integer in the NT Optional header.
/clock Measures and reports the following compilation times in milliseconds for the specified .il source file
/debug Includes debug information.
/dll Specifies the name of the dll file that is generated as output.
/flags=integer Sets ImageFlags to the value specified by integer in the common language runtime header.
/key:keyFile Compiles filename with a strong signature using the private key contained in keyFile.
/key:@keySource Compiles filename with a strong signature using the private key produced at keySource.
/listing Produces a listing file on the standard output.
/nologo Suppresses the Microsoft startup banner display.
/output:file.ext Specifies the output file name and extension.
/quiet Specifies quiet mode; does not report assembly progress.
/resource:file.res Includes the specified resource file in *.res format in the resulting .exe or .dll file.
/subsystem=integer Sets subsystem to the value specified by integer in the NT Optional header.
/? Displays help at the command prompt.

Example:

ilasm TestFileName – produces the executable TestFileName.exe
or
ilasm myTestFile /dll – produces the executable TestFileName.dll

 

What is Microsoft intermediate language (MSIL)?


Common Intermediate Language (CIL) (formerly called Microsoft Intermediate Language or MSIL) is the lowest-level human-readable programming language in the Common Language Infrastructure and in the .NET Framework. Languages which target the .NET Framework compile to CIL, which is assembled into bytecode. CIL resembles an object-oriented assembly language, and is entirely stack-based. It is executed by a virtual machine. The primary .NET languages are C#, Visual Basic .NET, C++/CLI, and J#.

CIL was originally known as Microsoft Intermediate Language (MSIL) during the beta releases of the .NET languages. Due to standardization of C# and the Common Language Infrastructure, the bytecode is now officially known as CIL. Because of this legacy, CIL is still frequently referred to as MSIL, especially by long-standing users of the .NET languages.

Microsoft intermediate language (MSIL), which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Before code can be run, MSIL must be converted to CPU-specific code, usually by a just-in-time (JIT) compiler. Because the common language runtime supplies one or more JIT compilers for each computer architecture it supports, the same set of MSIL can be JIT-compiled and run on any supported architecture.

When a compiler produces MSIL, it also produces metadata. Metadata describes the types in your code, including the definition of each type, the signatures of each type’s members, the members that your code references, and other data that the runtime uses at execution time. The MSIL and metadata are contained in a portable executable (PE) file that is based on and extends the published Microsoft PE and common object file format (COFF) used historically for executable content. This file format, which accommodates MSIL or native code as well as metadata, enables the operating system to recognize common language runtime images. The presence of metadata in the file along with the MSIL enables your code to describe itself, which means that there is no need for type libraries or Interface Definition Language (IDL). The runtime locates and extracts the metadata from the file as needed during execution.

 

What is .NET assembly?


Assemblies are the building blocks of .NET Framework applications; they form the fundamental unit of deployment, version control, reuse, activation scoping, and security permissions. An assembly is a collection of types and resources that are built to work together and form a logical unit of functionality. An assembly provides the common language runtime with the information it needs to be aware of type implementations. To the runtime, a type does not exist outside the context of an assembly.

Assemblies can be static or dynamic. Static assemblies can include .NET Framework types (interfaces and classes), as well as resources for the assembly (bitmaps, JPEG files, resource files, and so on). Static assemblies are stored on disk in portable executable (PE) files. You can also use the .NET Framework to create dynamic assemblies, which are run directly from memory and are not saved to disk before execution. You can save dynamic assemblies to disk after they have executed.

There are several ways to create assemblies. You can use development tools, such as Visual Studio .NET, that you have used in the past to create .dll or .exe files. You can use tools provided in the .NET Framework SDK to create assemblies with modules created in other development environments. You can also use common language runtime APIs, such as Reflection. Emit , to create dynamic assemblies.

 

What functions an assembly performs?


An assembly performs the following functions:

  • It contains code that the common language runtime executes. Microsoft intermediate language (MSIL) code in a portable executable (PE) file will not be executed if it does not have an associated assembly manifest. Note that each assembly can have only one entry point (that is, DllMain, WinMain, or Main).

  • It forms a security boundary. An assembly is the unit at which permissions are requested and granted. For more information about security boundaries as they apply to assemblies, see Assembly Security Considerations.

  • It forms a type boundary. Every type’s identity includes the name of the assembly in which it resides. A type called MyType loaded in the scope of one assembly is not the same as a type called MyType loaded in the scope of another assembly.

  • It forms a reference scope boundary. The assembly’s manifest contains assembly metadata that is used for resolving types and satisfying resource requests. It specifies the types and resources that are exposed outside the assembly. The manifest also enumerates other assemblies on which it depends.

  • It forms a version boundary. The assembly is the smallest versionable unit in the common language runtime; all types and resources in the same assembly are versioned as a unit. The assembly’s manifest describes the version dependencies you specify for any dependent assemblies. For more information about versioning, see Assembly Versioning.

  • It forms a deployment unit. When an application starts, only the assemblies that the application initially calls must be present. Other assemblies, such as localization resources or assemblies containing utility classes can be retrieved on demand. This allows applications to be kept simple and thin when first downloaded. For more information about deploying assemblies, see Deploying Applications.

  • It is the unit at which side-by-side execution is supported. For more information about running multiple versions of an assembly, see Assemblies and Side-by-Side Execution.