SlideShare a Scribd company logo
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:\Windows\Assembly .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

More Related Content

PPTX
Assemblies
DOC
.Net assembly
PPTX
Secrets of .NET Assemblies and Memory Management
PPTX
Assemblies versioning and signing
PPT
Attributes & .NET components
PPTX
Inside CoreCLR
PPTX
.NET Attributes and Reflection - What a Developer Needs to Know...
PDF
.NET TECHNOLOGIES
Assemblies
.Net assembly
Secrets of .NET Assemblies and Memory Management
Assemblies versioning and signing
Attributes & .NET components
Inside CoreCLR
.NET Attributes and Reflection - What a Developer Needs to Know...
.NET TECHNOLOGIES

What's hot (19)

PDF
.NET Core, ASP.NET Core Course, Session 3
PDF
.NET Core, ASP.NET Core Course, Session 5
PDF
.NET Core, ASP.NET Core Course, Session 6
DOC
.Net framework interview questions
DOCX
C# Unit 1 notes
PDF
Dotnet basics
PDF
.NET Core, ASP.NET Core Course, Session 9
PDF
Bootiful GraphQL with Kotlin
PDF
.NET Core, ASP.NET Core Course, Session 17
PPTX
Microsoft .Net Technology
PDF
.NET Core, ASP.NET Core Course, Session 1
PPT
C Sharp Jn
PPTX
Namespaces in C#
PPT
Android project architecture
PPT
UML Case Tools
DOCX
PPT
.Net introduction by Quontra Solutions
PPT
Migrating To Visual Studio 2008 & .Net Framework 3.5
PPTX
Architecture in .net
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 5
.NET Core, ASP.NET Core Course, Session 6
.Net framework interview questions
C# Unit 1 notes
Dotnet basics
.NET Core, ASP.NET Core Course, Session 9
Bootiful GraphQL with Kotlin
.NET Core, ASP.NET Core Course, Session 17
Microsoft .Net Technology
.NET Core, ASP.NET Core Course, Session 1
C Sharp Jn
Namespaces in C#
Android project architecture
UML Case Tools
.Net introduction by Quontra Solutions
Migrating To Visual Studio 2008 & .Net Framework 3.5
Architecture in .net
Ad

Viewers also liked (8)

PPTX
.Net Assemblies
PPT
Imenco Offshore Helicopter refuelling system presentation
PDF
ABC Breakfast Club m Linak: Vi hæver servicegraden m 20 procent i 2011
PPT
Indian salwar kameez_designs
PPT
Industria iraultza
PDF
Electro hex
PDF
2015 AHP International Conference session - Operations Opportunities
.Net Assemblies
Imenco Offshore Helicopter refuelling system presentation
ABC Breakfast Club m Linak: Vi hæver servicegraden m 20 procent i 2011
Indian salwar kameez_designs
Industria iraultza
Electro hex
2015 AHP International Conference session - Operations Opportunities
Ad

Similar to Talk on .NET assemblies (20)

PPTX
O porque das minhas aplicações funcionarem... E o que acontece com os recurso...
PDF
THE CLR AND THE .NET FRAMEWORK, C#
PPTX
C# Private assembly
PPTX
Visual Basic User Interface-VI
PPTX
Dot net assembly
PPTX
Introiduction to Assemblies and .NET platform
DOCX
What is Dll, Assemblies and GAC...?
PPS
10 gui 14
PDF
Dotnet framework difference faqs- 3
PPS
Vb.net session 13
PDF
tybsc it asp.net full unit 1,2,3,4,5,6 notes
PPTX
1assembly in c#
PPS
Net framework session03
PPTX
Assembly
PPS
Vb net xp_16
PPTX
C# Global Assembly Cache
PPTX
Assemblies in asp
PPT
N-Tier Application with Windows Forms - Deployment and Security
PPTX
Dotnet Basics Presentation
PPT
Dot net
O porque das minhas aplicações funcionarem... E o que acontece com os recurso...
THE CLR AND THE .NET FRAMEWORK, C#
C# Private assembly
Visual Basic User Interface-VI
Dot net assembly
Introiduction to Assemblies and .NET platform
What is Dll, Assemblies and GAC...?
10 gui 14
Dotnet framework difference faqs- 3
Vb.net session 13
tybsc it asp.net full unit 1,2,3,4,5,6 notes
1assembly in c#
Net framework session03
Assembly
Vb net xp_16
C# Global Assembly Cache
Assemblies in asp
N-Tier Application with Windows Forms - Deployment and Security
Dotnet Basics Presentation
Dot net

Talk on .NET assemblies

  • 1. Bellevue .NET User Group www.BellevueDotNet.com Vidya Vrat Agarwal . | .NET Consultant MCPD, MCTS, MCT, MCSD.NET , MCAD and MCSD Talk on .NET Assemblies
  • 2. 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)
  • 3. 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.
  • 4. 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.
  • 5. Demo Probing process with Private Assembly
  • 6. 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
  • 7. . 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.
  • 8. Demo Accessing private assembly using .config file
  • 9. Shared Assemblies and GAC GAC is Global Assembly Cache GAC is located at C:\Windows\Assembly .NET dlls live in GAC and user created .dll can also live in GAC and can be referenced as Shared dll by many apps.
  • 10. Demo Deploy an assembly into GAC & Access an assembly from GAC
  • 11. 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.
  • 12. Demo Client Redirection to newly deployed assembly in GAC
  • 13. 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
  • 15. 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.
  • 16. Demo Native Image Generator (Ngen.exe)