ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.

Slides:



Advertisements
Similar presentations
Ahead of Time Dynamic Translation PreJit/NGEN by any other name George Bosworth Microsoft MRE04 March 21, 2004.
Advertisements

Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
DESIGNING A PUBLIC KEY INFRASTRUCTURE
Chapter 9 Chapter 9: Managing Groups, Folders, Files, and Object Security.
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Programming in the Office 2003 Environment Corinne Hoisington.
.NET deployment and configuration (but mostly about security) Jørgen Thyme Microsoft Denmark.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
Assembly Where it all gets physical. Objectives Introduce concepts of assemblies Discuss elements of assemblies Show how to build assemblies Runtime aspects.
ASP.Net Security: Fundamentals Chapters 1-4 Freeman and Jones Book.
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
MCTS Guide to Microsoft Windows Server 2008 Network Infrastructure Configuration Chapter 7 Configuring File Services in Windows Server 2008.
Module 15 Configuring and Deploying Windows Client Applications.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
© 2004 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Programming the Web Using ASP.Net Chapter 2: The ASP.Net Template Dave.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
Deployment of web Site. Preparing the web site for deployment you now have two versions of web site 1 -one running in the production environment 2-one.
.NET Framework Introduction: Metadata
SQL Server Integration Services (SSIS) Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server (MVP) Microsoft Certified Technology Specialist.
1 Namespaces and Assemblies © University of Linz, Institute for System Software, 2004 published under the Microsoft Curriculum License.
© 2008 Dr. Paul Walcott – The University of the West Indies: Cave Hill CampusDr. Paul Walcott COMP6325 Advanced Web Technologies Dr. Paul Walcott The University.
The Metadata System1. 2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++
DEV343.NET Application and Library Versioning Juval Löwy
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
.NET Framework & C#.
 Internet providing backbone for applications  Use of several web sites and devices to provide one complete solution  Software as services  Quick software.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Understanding Code Compilation and Deployment Lesson 4.
CSC 494/594 C# and ASP.NET Programming. C# 2012 C# Object-oriented language with syntax that is similar to Java.
Importing outside DLLs into.Net platform and using them By Anupama Atmakur.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Introduction .NET Framework
ASSEMBLIES AND THE GAC CHAPTER 1, LESSONS 4-7 & LAB.
Agenda Assemblies 101 Anatomy of an Assembly What is Metadata? Assembly Variations Signing Assemblies Global Assembly Cache.
.NET Framework Danish Sami UG Lead.NetFoundry
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
1.NET FRAMEWORK CE-105 Spring 2007 Engr. Faisal ur Rehman.
SECURITY ISSUES. Introduction The.NET Framework includes a comprehensive set of security tools –Low-level classes and an overall framework –Managing code.
Week #3 Objectives Partition Disks in Windows® 7 Manage Disk Volumes Maintain Disks in Windows 7 Install and Configure Device Drivers.
Code Access Security CS 795. Terminology--CLR Common Language Runtime: –The.NET Framework provides a runtime environment which runs the code and provides.
.NetDeploymentNOEA / PQC 2005 Application Deployment and Versioning Source: Joe Hummel, kursus i.Net, jan
Section 11: Implementing Software Restriction Policies and AppLocker What Is a Software Restriction Policy? Creating a Software Restriction Policy Using.
System.Security.Policy namespace Chinmay Lokesh.NET Security CS 795 Summer 2010.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company.NET Assemblies Presented By : Muhammad Atif Hussain Deputy Manager IT.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
Lecture 4: J# Execution Model. 2 MicrosoftIntroducing CS using.NETJ# in Visual Studio.NET 4-2 Objectives “J# programs execute like any other.NET program.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
Creating and Managing Digital Certificates Chapter Eleven.
DEV395 No Touch Deployment for Windows Forms Jamie Cool Program Manager.NET Client Microsoft Corporation.
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
Understanding.NET Framework Security David LeBlanc Microsoft Office.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Building Custom Controls with ASP.NET and the Microsoft ®.NET Framework Rames Gantanant Microsoft Regional Director, Thailand
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Customizing.NET Security Permissions Nageswari Vallabhaneni.
Assemblies. 2 Objectives Introduce assemblies –concept –creation –naming Discuss deployment –main.exe –dependent assemblies.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
IS 350 Course Introduction. Slide 2 Objectives Identify the steps performed in the software development life cycle Describe selected tools used to design.
ClickOnce Deployment (One-click Deployment)
INF230 Basics in C# Programming
Chapter 9 S. NandaGopalan, BIT
Visual Studio Tools for Office 2005
.NET and .NET Core 2. .NET Runtimes Pan Wuming 2017.
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

ASSEMBLY

A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces and resources that an application requires The compiler translates the source code into the Intermediate language(IL) code In addition to translating the code into IL, the compiler also produces metadata about the program It also contains an assembly manifest that contains the assembly metadata

T HE ASSEMBLY MANIFEST Every assembly contains an assembly manifest, a set of metadata with information about the assembly. The assembly manifest contains these items: The assembly name and version The culture or language the assembly supports (not required in all assemblies) The public key for any strong name assigned to the assembly (not required in all assemblies) A list of files in the assembly with hash information Information on referenced assemblies In addition, you can add other information to the manifest by using assembly attributes.

M ETADATA Metadata is data about data Metadata describes every type and member defined in your code in a Multilanguage form

M ETADATA I N A SSEMBLY Type Descriptions Classes Base classes Implemented interfaces Data members Methods NameVersionCulture Assembly Description Other assemblies Security Permissions Exported Types

A SSEMBLIES An Assembly is the managed equivalent of an EXE / DLL Smallest deployable unit in the CLR Have unique version number No version conflicts(known as DLL hell) Contains IL code to be executed Security boundary-permissions are granted at the assembly level Type boundary-all types include the assembly name they are a part of Self-describing manifest—metadata that describes the types in the assembly

A SSEMBLIES All.NET programs are constructed from these Assemblies. Assemblies are made of two parts: manifest, contains information about what is contained within the assembly modules, internal files of IL code which are ready to run and metadata. When programming, we don't directly deal with assemblies as the CLR and the.NET framework takes care of that behind the scenes.

Self-Describing It contains all information about the types (classes) contained in the assembly, all external references needed for executing the assembly and so on. This is possible with an assembly manifest Assemblies can be viewed by application developers with the help of a tool called ildasm (IL Disassembler) provided by the.NET Framework.

T YPES OF ASSEMBLIES Assemblies can be private or shared. The assembly which is used by a single application is called as private assembly. Suppose we have created a DLL which encapsulates business logic. This DLL is used by the client application only and not by any other application.

S TEPS TO CREATE P RIVATE ASSEMBLY Create a ClassLibrary. Then afterwards build it. After building,.dll is created. Now we can find that really,.dll file has been created in the bin\Debug folder. Now we want to use this.dll in our new Widows Form Application. Now I have created one New Windows Form Application. Add the.dll by Add Reference->Browse. And as we can see, select the required.dll

Separate copy of ClassLibrary1.dll has been copied here in Windows Form Application. So this is Private Assembly.

S HARED ASSEMBLIES To make a shared assembly, we require it to store in Global Assembly Cache GAC. GAC is reserved for storing assemblies and for sharing them in between different applications. Here every assembly must have an unique name. So we need to assign strong name to assemblies before storing it in the GAC.

P ICTORIAL REPRESENTATION OF S HARED A SSEMBLY GAC (shared assembly) Application1 Application2Application3Application4

A DDING. DLL IN THE GAC

L OCATION OF S HARED A SSEMBLY Here our shared assembly is located.

Here no separate copy of assembly is pasted in the WindowApplication3\bin\debug folder. Instead here the shared assembly from the GAC has been used.

W HAT IS G LOBAL A SSEMBLY C ACHE ? An assembly that is shared by multiple applications is called a global assembly and is installed in the global assembly cache (GAC). Global assembly cache is nothing but a special disk folder where all the shared assemblies are kept. It is located under C:\Windows\Microsoft.NET \assembly\GAC_MSIL folder on every machine running the.NET framework.

B ENEFITS OF P RIVATE A SSEMBLIES Private assemblies are installed in a directory named bin\Debug located under the application directory. These files are private to the application. It is great for small utility Assemblies/ application specific code

D ISADVANTAGE When you have multiple applications using one assembly, you have to deploy the assembly to the bin directory of each application.

The.NET Framework uses assemblies as the fundamental unit for several purposes: Security Type Identity Reference Scope Versioning Deployment

S ECURITY An assembly is the unit at which security permissions are requested and granted. Assemblies are also the level at which you establish identity and trust. The.NET Framework provides two mechanisms for this level of assembly security: strong names and Signcode.exe. You can also manage security by specifying the level of trust for code from a particular site or zone. Signing an assembly with a strong name adds public key encryption to the assembly. This ensures name uniqueness and prevents substituting another assembly with the same name for the assembly that you provided.

S ECURITY The signcode.exe tool embeds a digital certificate in the assembly. This allows users of the assembly to verify the identity of the assembly's developer by using a public or private trust hierarchy. You can choose to use either strong names, Signcode.exe, or both, to strengthen the identity of your assembly. The common language runtime also uses internal hashing information, in conjunction with strong names and signcode, to verify that the assembly being loaded has not been altered after it was built.

T YPE I DENTITY The identity of a type depends on the assembly where that type is defined. That is, if you define a type named DataStore in one assembly, and a type named DataStore in another assembly, the.NET Framework can tell them apart because they are in two different assemblies. Of course you can't define two different types with the same name in the same assembly.

R EFERENCE S COPE The assembly is also the location of reference information in general. Each assembly contains information on references in two directions: The assembly contains metadata that specifies the types and resources within the assembly that are exposed to code outside of the assembly. For example, a particular assembly could expose a public type named Customer with a public property named AccountBalance. The assembly contains metadata specifying the other assemblies on which it depends. For example, a particular assembly might specify that it depends on the System.Windows.Forms.dll assembly.

V ERSIONING Each assembly has a 128-bit version number that is presented as a set of four decimal pieces: Major.Minor.Build.Revision For example, an assembly might have the version number By default, an assembly will only use types from the exact same assembly (name and version number) that it was built and tested with.

D EPLOYMENT Assemblies are the natural unit of deployment. You can also deploy assemblies in other ways, including by a simple xcopy to the target system or via code download from a web site. When you start an application, it loads other assemblies as a unit as types and resources from those assemblies are needed.