
Deploying .NET Applications Learning MSBuild and ClickOnce Sayed Y. Hashimi and Sayed Ibrahim Hashimi Deploying .NET Applications: Learning MSBuild and ClickOnce Copyright © 2006 by Sayed Y. Hashimi, Sayed Ibrahim Hashimi All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13 (pbk): 978-1-59059-652-4 ISBN-10 (pbk): 1-59059-652-8 Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1 Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. Lead Editor: Jonathan Hassell Technical Reviewer: Bart De Smet Editorial Board: Steve Anglin, Ewan Buckingham, Gary Cornell, Jason Gilmore, Jonathan Gennick, Jonathan Hassell, James Huddleston, Chris Mills, Matthew Moodie, Dominic Shakeshaft, Jim Sumser, Keir Thomas, Matt Wade Project Manager: Richard Dal Porto Copy Edit Manager: Nicole LeClerc Copy Editor: Kim Wimpsett Assistant Production Director: Kari Brooks-Copony Production Editor: Ellie Fountain Compositor: Kinetic Publishing Services, LLC Proofreader: Dan Shaw Indexer: Brenda Miller Artist: Kinetic Publishing Services, LLC Cover Designer: Kurt Krames Manufacturing Director: Tom Debolski Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax 201-348-4505, e-mail [email protected], or visit http://www.springeronline.com. For information on translations, please contact Apress directly at 2560 Ninth Street, Suite 219, Berkeley, CA 94710. Phone 510-549-5930, fax 510-549-5939, e-mail [email protected], or visit http://www.apress.com. The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in this work. The source code for this book is available to readers at http://www.apress.com in the Source Code section. To my parents, Sayed A. and Sohayla Hashimi, and to my wife and daughter, Farishta and Fairoza. —Sayed Y. Hashimi To my parents, Sayed A. and Sohayla Hashimi, because this would have not been possible without their support and guidance. —Sayed Ibrahim Hashimi Contents at a Glance About the Authors . xi About the Technical Reviewer . xiii Acknowledgments . xv Introduction . xvii ■CHAPTER 1 Deployment Prerequisites. 1 ■CHAPTER 2 The Unified Build Engine: MSBuild. 21 ■CHAPTER 3 MSBuild: By Example . 45 ■CHAPTER 4 Extending MSBuild . 75 ■CHAPTER 5 Introducing Team Foundation Server and Team Build . 107 ■CHAPTER 6 Deploying Smart Clients with ClickOnce . 137 ■CHAPTER 7 ClickOnce Updates, Security, and the Bootstrapper . 161 ■CHAPTER 8 The ClickOnce Data Directory and Deploying Prerequisites . 185 ■CHAPTER 9 ClickOnce Tools and Scenarios . 219 ■INDEX . 253 v Contents About the Authors . xi About the Technical Reviewer . xiii Acknowledgments . xv Introduction . xvii ■CHAPTER 1 Deployment Prerequisites . 1 Types of Applications . 1 Windows Forms (Smart Client) Applications . 2 Web Applications . 6 Web Services . 9 Smart Device Applications . 10 Windows Services . 11 Console Applications . 13 Hosted Applications. 13 Application Architectures . 14 Client-Server Architecture . 14 N-Tier Architecture . 15 Service-Oriented Architecture . 16 Strategies for Deploying the .NET Framework . 17 Where Do You Need the .NET Runtime? . 17 Typical Deployment of a Smart Client . 18 Typical Deployment of a Thin Client . 18 Summary . 19 ■CHAPTER 2 The Unified Build Engine: MSBuild. 21 Introducing Build Tools and Systems . 22 Make-Style Build Tools . 22 Ant/NAnt . 23 Introducing MSBuild . 24 Properties . 26 Targets. 27 Tasks . 37 Summary . 43 vii viii ■CONTENTS ■CHAPTER 3 MSBuild: By Example . 45 Introducing Well-Known Metadata . 45 Formatting Your Output. 48 Editing MSBuild Files with IntelliSense . 54 Integrating MSBuild into Visual Studio. 55 Introducing Custom Metadata. 57 Understanding the Difference Between @ and % . 59 Using Environment Variables in Your Project. 63 Reusing MSBuild Project Elements . 63 Dealing with MSBuild Errors . 69 Summary . 74 ■CHAPTER 4 Extending MSBuild. 75 Logging with MSBuild. 75 Writing a Logger. 77 Using NUnit and MSBuild . 85 Summary . 106 ■CHAPTER 5 Introducing Team Foundation Server and Team Build. 107 Introducing Visual Studio Team System (VSTS) . 107 Introducing Team Build. 108 Introducing the Team Foundation Build Architecture. 108 Team Foundation Build Client . 109 Application Tier. 110 Data Tier . 110 Build Machine. 110 Drop Location . 110 Using Team Foundation Build . 110 Creating a New Team Project. ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages27 Page
-
File Size-