• Save
Talk on .NET assemblies
Upcoming SlideShare
Loading in...5
×
 

Talk on .NET assemblies

on

  • 1,505 views

 

Statistics

Views

Total Views
1,505
Views on SlideShare
1,472
Embed Views
33

Actions

Likes
1
Downloads
20
Comments
0

1 Embed 33

http://www.bellevuedotnet.com 33

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Talk on .NET assemblies Talk on .NET assemblies Presentation Transcript

  • Bellevue .NET User Group www.BellevueDotNet.com Vidya Vrat Agarwal . | .NET Consultant MCPD, MCTS, MCT, MCSD.NET , MCAD and MCSD Talk on .NET Assemblies
  • Agenda
    • What is .NET Assembly
    • Probing process
    • Private assemblies
    • Accessing private assembly using .config file
    • Shared Assemblies and GAC
    • Client Redirection to newly deployed assembly in GAC
    • Assembly execution and JIT
    • Native Image Generator (Ngen.exe)
  • What is .NET Assembly
    • An assembly is a compiled .NET dll or exe.
    • An assembly in .NET contains Metadata and Manifest
    • Metadata is data about data.
    • Manifest is data about assembly (version info, dependencies etc)
    • ILDasm.exe can show the metadata and Manifest.
  • Probing process and Private Assembly
    • Probing is the process how .NET look out for an assembly during execution.
    • Any assembly which lives in an application folder is known as Private assembly
    • If an assembly is not found during the probing process FileNotFoundException exception is thrown.
  • Demo Probing process with Private Assembly
  • Accessing private assembly using .config file
    • Define a number of subdirectories to group related content. For example, assume you have an application directory named C:MyApp that contains MyApp.exe. Under this folder might be a subfolder named MyLibraries that contains MyApp.dll
    • Regardless of the intended relationship between these two directories, the CLR will not probe the MyLibraries subdirectory unless you supply a configuration file
    • . Configuration files contain various XML elements that allow you to influence the probing process.
    • . Configuration files must have the same name as the launching application and take a *.config file extension, and they must be deployed in the client’s application directory.
    • Thus, if you wish to create a configuration file for MyApp.exe, it must be named MyApp.exe.config and located under the C:MyApp directory or where the .exe lives.
  • Demo Accessing private assembly using .config file
  • Shared Assemblies and GAC
    • GAC is Global Assembly Cache
    • GAC is located at C:WindowsAssembly
    • .NET dlls live in GAC and user created
    • .dll can also live in GAC and can be referenced as Shared dll by many apps.
  • Demo Deploy an assembly into GAC & Access an assembly from GAC
  • Client Redirection to newly deployed assembly in GAC
    • Scenario: Consider you have a ver 1.0 deployed and later you built a new functionality as Ver 2.0, now you need redirect all the clients to the this new version of GAC deployed assembly.
  • Demo Client Redirection to newly deployed assembly in GAC
  • Assembly execution and JIT Visual Basic .NET Visual C# Visual C++ .NET .NET Platform Code .NET Framework Class Library XML Web Services ADO.NET Data Types Common Language Runtime Source code compiles as MSIL/IL/CIL Programming Services JIT compiler produces machine language Assembly execution and JIT
  • Demo Assembly execution and JIT
  • Native Image Generator (Ngen.exe)
    • Ngen.exe is a tool that improves the performance of managed applications.
    • Ngen.exe creates native images, which are files containing compiled processor-specific machine code, and installs them into the native image cache on the local computer.
    • The runtime can use native images from the cache instead using the just-in-time (JIT) compiler to compile the original assembly.
  • Demo
    • Native Image Generator (Ngen.exe)
  • Questions