DEV343.NET Application and Library Versioning Juval Löwy www.idesign.net.

Slides:



Advertisements
Similar presentations
DESIGNING A PUBLIC KEY INFRASTRUCTURE
Advertisements

16.1 © 2004 Pearson Education, Inc. Exam Planning, Implementing, and Maintaining a Microsoft® Windows® Server 2003 Active Directory Infrastructure.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Deployment Your Salvation from DLL Hell. Objectives Overview Assemblies „XCopy“ Deployment Configuration Administration.
.NET deployment and configuration (but mostly about security) Jørgen Thyme Microsoft Denmark.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment Chapter 9: Implementing and Using Group Policy.
Hands-On Microsoft Windows Server 2003 Administration Chapter 5 Administering File Resources.
Assembly Where it all gets physical. Objectives Introduce concepts of assemblies Discuss elements of assemblies Show how to build assemblies Runtime aspects.
70-293: MCSE Guide to Planning a Microsoft Windows Server 2003 Network, Enhanced Chapter 7: Planning a DNS Strategy.
ASP.Net Security: Fundamentals Chapters 1-4 Freeman and Jones Book.
Christopher Chapman | MCT Content PM, Microsoft Learning, PDG Planning, Microsoft.
Guide to MCSE , Enhanced 1 Activity 9-1: Creating a Group Policy Object Using the MMC Objective: To create a GPO using the Group Policy Object Editor.
Digital Signature Xiaoyan Guo/ Xiaohang Luo/
Page 1 Sandboxing & Signed Software Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
OFC302 Building Smart Document Solutions in Word & Excel Martin Sawicki Lead Program Manager.
OFC 322 Building Office Research Web Services: Exposing Corporate Data Through Office Brian Jones Program Manager Authoring Services Martin Sawicki Lead.
70-290: MCSE Guide to Managing a Microsoft Windows Server 2003 Environment, Enhanced Chapter 9: Implementing and Using Group Policy.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
DEV334 Creating Application Starting Points & Sharing Best Practices with Enterprise Templates Marc Gusmano Director of Emerging Technologies The Information.
1 Namespaces and Assemblies © University of Linz, Institute for System Software, 2004 published under the Microsoft Curriculum License.
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
Understanding Code Compilation and Deployment Lesson 4.
Importing outside DLLs into.Net platform and using them By Anupama Atmakur.
Week #7 Objectives: Secure Windows 7 Desktop
DEV290 Building Office Solutions with Visual Studio Eric Carter Lead Developer Developer Platform & Evangelism Microsoft Corporation.
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
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.
SEC303 Assessing and Managing Privacy in the Enterprise JC Cannon Privacy Strategist.
11 MANAGING AND DISTRIBUTING SOFTWARE BY USING GROUP POLICY Chapter 5.
DAT305 Boost Your Data-Driven Application Development Using SQL Server Centric.NET Code Generator Pascal Belaud Microsoft France.
.NET Framework Danish Sami UG Lead.NetFoundry
DEV325 Deploying Visual Studio.NET Applications Billy Hollis Author / Consultant.
OFC290 Information Rights Management in Microsoft Office 2003 Lauren Antonoff Group Program Manager.
DEV339 Best Practices for Debugging Visual Studio.NET Applications Keith Pleas Architect, Guided Design
DEP350 Windows ® Rights Management (Part 1): Introduction, Concepts, And Technology Marco DeMello Group Program Manager Windows Trusted Platforms & Infrastructure.
Migration from Software Update Services to Windows Server Update Services Jeff Alexander IT Pro Evangelist Microsoft Australia Scott Korman WSUS MVP SEC316.
Sage ACT! 2013 SDK Update Brian P. Mowka March 23, 2012 Template date: October 2010.
Deploy.NET Applications with Ease Brian Noyes IDesign, Inc.
DEV337 Modeling Distributed Enterprise Applications Using UML in Visual Studio.NET David Keogh Program Manager Visual Studio Enterprise Tools.
Efficient Deployment & Management of ASP.NET 2.0 Applications on IIS 6.0 Alexis Eller Program Manager Internet Information Services Microsoft Corporation.
Paul Butterworth Management Technology Architect
.NetDeploymentNOEA / PQC 2005 Application Deployment and Versioning Source: Joe Hummel, kursus i.Net, jan
DEV384 COM+ Lives : New Features in Enterprise Services Included in Windows Server 2003 Catherine Heller Senior Consultant Microsoft Spain.
Section 11: Implementing Software Restriction Policies and AppLocker What Is a Software Restriction Policy? Creating a Software Restriction Policy Using.
AUC Technologies Projects Consulting, Development, Mentoring, and Training Company.NET Assemblies Presented By : Muhammad Atif Hussain Deputy Manager IT.
WEB320 Migrating ASP.NET 1.x Applications to ASP.NET 2.0 Stefan Schackow Program Manager Web Platform and Tools Team Microsoft Corporation.
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 11: Managing Access to File System Resources.
EBZ 321 Extending CMS 2002 Publishing Processes Scott Fynn Microsoft Consulting Services National Practices.
DEV303 ASP.NET: Leveraging Visual Studio.NET For Web Projects Tony Goodhew Product Manager Microsoft Corp.
DEV330 Visual Studio.NET IDE Tips and Tricks Billy Hollis Author / consultant.
MBL490 Deploying Applications to Smartphone and Microsoft® Powered Pocket PC Marcus Perryman Consultant.
DEV396 Windows Forms: No Touch Deployment Tips and Tricks Jamie Cool Program Manager.NET Client Microsoft Corporation.
.NET Ying Chen Junwei Chen. What is Microsoft.NET. NET is a development platform Incorporated into.NET COM+ component services ASP web development framework.
MSG331 Exchange Server 2000/2003 Software Development Kit Susan Hill Lead Programmer Writer Microsoft Corporation.
DAT300 SQL Server Notification Services: Application Development Ken Henderson Technical Lead, SQL Server Support Microsoft Corporation
DEV395 No Touch Deployment for Windows Forms Jamie Cool Program Manager.NET Client Microsoft Corporation.
What is GAC Repository containing all the assemblies of CLR Machine wide Assemblies shared by several applications Where CLR is installed C:\Windows\Microsoft.NET\assembly\GAC_MSIL.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
Module 4: Deployment and Versioning. Overview Introduction to Application Deployment Application Deployment Scenarios Related Topics and Tools.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
EBIZ312 Connecting Host Systems to Microsoft Technologies Paul Larsen Aaron Grady Microsoft Corporation.
Assemblies. 2 Objectives Introduce assemblies –concept –creation –naming Discuss deployment –main.exe –dependent assemblies.
DAT 390 Advanced ADO.NET Programming Techniques Jackie Goldstein Renaissance Computer Systems
ClickOnce Deployment (One-click Deployment)
Visual Studio Tools for Office 2005
Enterprise Library Overview
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

DEV343.NET Application and Library Versioning Juval Löwy

Software architect Former corporate architect of a Fortune 500 company Consults on.NET migration and design MS Regional Director for the Silicon Valley Participates in.NET design reviews Authored Programming.NET Components (2003, O’Reilly) COM and.NET Component Services (2001, O’Reilly) Contributing editor and columnist to several magazines Contact at About Juval Löwy

Outline Sharing and versioning Side-by-side execution Custom version policies CLR versioning

Shared Assemblies Assemblies can be private or shared A private assembly resides in the app directory A shared assembly is in a known location, called the global assembly cache (GAC) Shared assembly used for: Sharing Side-by-side execution

Shared Assemblies Shared assemblies must have a unique name Called Strong Name Strong name authenticates assembly’s origin and identity Shared assembly implies trust Strong name cannot be generated by a party other than the original publisher Strong name is based on public/private keys pair

Shared Assemblies Digitally signs the assembly to verify origin Encrypt manifest using the private key Append signature to manifest Incorporated public key into the assembly To verify authenticity.NET loader generates the hash Decrypts the manifest-stored hash Compare Can only call signed assembly from within signed assemblies

[assembly: AssemblyKeyFile("MyAssembly.snk")] Shared Assemblies To generate keys pair: sn.exe –k MyAssembly.snk Add the snk file to assembly info file: Installing in the GAC Drag and drop.NET configuration tool gacutil –i MyAssembly.dll

Shared Assemblies You need to reference assembly to build the client But not to deploy it

Shared Assemblies Disable client local copy of a shared assembly Set to False automatically if in the GAC already, and not added using the Projects tab Side-by-Side Demo

Versioning Assemblies are not necessarily backward- compatible Each client assembly records in manifest exact version of ot5her server assemblies.NET resolves compatibility at runtime Version number is the product of: Major,Minor,Build,Revision Recorded as assembly attribute [assembly: AssemblyVersion(" ")] Major Minor Build Revision

Either explicitly specify version numbers, or rely on compiler What is not specified is zeroed If you provide major & minor, can * build and revision Build is number of days since January 1, 2000, LIMA Revision is half number of seconds since midnight, LIMA [assembly: AssemblyVersion("2")] [assembly: AssemblyVersion("2.1")] [assembly: AssemblyVersion("2.1.*")]//best [assembly: AssemblyVersion(" ")] [assembly: AssemblyVersion(" *")] Versioning

Resolving Version When trying to use a shared assembly Possible many versions of the same assembly in the GAC Client always gets assembly with exact version match Can provide custom policy Developers must be disciplined Release procedures

Resolving Version Private assembly can be strongly named.NET ignores version of private assemblies with friendly name only.NET enforces version compatibility of private assembly with strong name

Resolving Version Conclusions Private assemblies with only friendly names must be backward compatible Private assemblies with strong name may not be backward compatible Even if a private assemblies with strong name is backward compatible (content wise), if the version number is not compatible, it may result in an exception Private assembly deployment model is really intended to work with friendly names only

Custom Version Policy Application can provide version binding policy Override default policy For shared and private assemblies Can deploy machine-wide policy.NET configuration tool MMC snap-in

Custom Version Binding Binding policy:

Custom Version Binding Codebase policy: Redirect to new location

CLR Versioning.NET rigorous version computability enforcement makes CLR versioning an interesting problem Different set of ground rules for CLR versioning CLR version used depends on: What the app is built with Available.NET versions Application CLR versioning policy

CLR Versioning CLR and application frameworks assemblies treated as one versioning unit Avoid mix-and-match Intend to be backward compatible, but not forward Developers must test and certify support for each CLR version

CLR Versioning CLR Side-By Side execution Multiple CLR versions on same machine Can install and uninstall versions separately

CLR Versioning Version unification Host process uses single CLR version.NET always runs unified stack of framework assemblies EXE application assembly and class libraries it loads use same CLR version Application select CLR and application frameworks version Class libraries have no say

CLR Versioning Default CLR version resolution.NET detects version app compiled with Loads latest compatible CLR version on machine Compatibility list maintained in Registry Can lead to undetermined results

CLR Versioning Applications that rely on default typically mainstream applications Use subset of types and services supported by all CLR versions Implicitly stating any compatible CLR version is allowed

Specifying supported CLR versions in config file For deterministic results In order of priority CLR Versioning

If no supported version is found,.NET refuses to load CLR Versioning

Can specify supported runtime at project setting

CLR Versioning Can specify supported runtime at project setting

More at TechEd C# Best Practices Day July 01 Distributed Security Practices Day July 02 Building High-Performance Applications with Visual Studio.NET Day July 03 Application and Library Versioning Day July 03 Software Legends Friday July 04

Resources Programming.NET components By Juval Lowy, O'Reilly April Master Class 3-4 annually Upcoming events on

Community Resources Most Valuable Professional (MVP) Newsgroups Converse online with Microsoft Newsgroups, including Worldwide User Groups Meet and learn with your peers

evaluations evaluations

SOFTWARE LEGEND Juval Lowy THURSDAY 3rd JULY at hrs Meet the Author’s Book signing

© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.