ebook img

Professional Visual Studio 2012 PDF

1108 Pages·2012·45.726 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Professional Visual Studio 2012

www.it-ebooks.info www.it-ebooks.info ffffiirrss..iinndddd ii 1100//1188//22001122 66::1166::0022 PPMM PROFESSIONAL VISUAL STUDIO® 2012 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxxix (cid:2) PART I INTEGRATED DEVELOPMENT ENVIRONMENT CHAPTER 1 A Quick Tour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 CHAPTER 2 The Solution Explorer, Toolbox, and Properties . . . . . . . . . . . . . . . . . . . . .13 CHAPTER 3 Options and Customizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31 CHAPTER 4 The Visual Studio Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 CHAPTER 5 Find and Replace and Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 (cid:2) PART II GETTING STARTED CHAPTER 6 Solutions, Projects, and Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81 CHAPTER 7 IntelliSense and Bookmarks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 CHAPTER 8 Code Snippets and Refactoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127 CHAPTER 9 Server Explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 CHAPTER 10 Modeling with the Class Designer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 (cid:2) PART III DIGGING DEEPER CHAPTER 11 Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177 CHAPTER 12 Documentation with XML Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 CHAPTER 13 Code Consistency Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 CHAPTER 14 Code Generation with T4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 CHAPTER 15 Project and Item Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257 CHAPTER 16 Language-Specifi c Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275 (cid:2) PART IV RICH CLIENT APPLICATIONS CHAPTER 17 Windows Forms Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291 CHAPTER 18 Windows Presentation Foundation (WPF) . . . . . . . . . . . . . . . . . . . . . . . .305 CHAPTER 19 Offi ce Business Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 CHAPTER 20 Windows Store Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347 Continues www.it-ebooks.info ffffiirrss..iinndddd ii 1100//1188//22001122 66::1166::0022 PPMM (cid:2) PART V WEB APPLICATIONS CHAPTER 21 ASP.NET Web Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 361 CHAPTER 22 ASP.NET MVC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395 CHAPTER 23 Silverlight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425 CHAPTER 24 Dynamic Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .439 CHAPTER 25 SharePoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 CHAPTER 26 Windows Azure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .483 (cid:2) PART VI DATA CHAPTER 27 Visual Database Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501 CHAPTER 28 DataSets and DataBinding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .509 CHAPTER 29 Language Integrated Queries (LINQ) . . . . . . . . . . . . . . . . . . . . . . . . . . . .535 CHAPTER 30 The ADO.NET Entity Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 561 CHAPTER 31 Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .583 (cid:2) PART VII APPLICATION SERVICES CHAPTER 32 Windows Communication Foundation (WCF) . . . . . . . . . . . . . . . . . . . . . 619 CHAPTER 33 Windows Workfl ow Foundation (WF) . . . . . . . . . . . . . . . . . . . . . . . . . . . .639 CHAPTER 34 Client Application Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 661 CHAPTER 35 Synchronization Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .679 CHAPTER 36 WCF RIA Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .689 (cid:2) PART VIII CONFIGURATION AND RESOURCES CHAPTER 37 Confi guration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .703 CHAPTER 38 Connection Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 721 CHAPTER 39 Resource Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731 (cid:2) PART IX DEBUGGING CHAPTER 40 Using the Debugging Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .751 CHAPTER 41 Debugging with Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .769 CHAPTER 42 DataTips, Debug Proxies, and Visualizers . . . . . . . . . . . . . . . . . . . . . . . . 781 CHAPTER 43 Debugging Web Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .793 CHAPTER 44 Advanced Debugging Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .811 www.it-ebooks.info ffffiirrss..iinndddd iiii 1100//1188//22001122 66::1166::0033 PPMM (cid:2) PART X BUILD AND DEPLOYMENT CHAPTER 45 Upgrading with Visual Studio 2012 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831 CHAPTER 46 Build Customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .837 CHAPTER 47 Assembly Versioning and Signing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .853 CHAPTER 48 Obfuscation, Application Monitoring, and Management . . . . . . . . . . . 861 CHAPTER 49 Packaging and Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 881 CHAPTER 50 Web Application Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .895 (cid:2) PART XI CUSTOMIZING AND EXTENDING VISUAL STUDIO CHAPTER 51 The Automation Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .909 CHAPTER 52 Add-Ins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 917 CHAPTER 53 Managed Extensibility Framework (MEF) . . . . . . . . . . . . . . . . . . . . . . . . 931 (cid:2) PART XII VISUAL STUDIO ULTIMATE CHAPTER 54 Visual Studio Ultimate for Architects . . . . . . . . . . . . . . . . . . . . . . . . . . . .953 CHAPTER 55 Visual Studio Ultimate for Developers . . . . . . . . . . . . . . . . . . . . . . . . . . .965 CHAPTER 56 Visual Studio Ultimate for Testers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .983 CHAPTER 57 Team Foundation Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .997 INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1021 www.it-ebooks.info ffffiirrss..iinndddd iiiiii 1100//1188//22001122 66::1166::0033 PPMM www.it-ebooks.info ffffiirrss..iinndddd iivv 1100//1188//22001122 66::1166::0033 PPMM PROFESSIONAL Visual Studio® 2012 Bruce Johnson www.it-ebooks.info ffffiirrss..iinndddd vv 1100//1188//22001122 66::1166::0033 PPMM Professional Visual Studio® 2012 Published by John Wiley & Sons, Inc. 10475 Crosspoint Boulevard Indianapolis, IN 46256 www.wiley.com Copyright © 2013 by John Wiley & Sons, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-1-118-33770-7 ISBN: 978-1-118-41648-8 (ebk) ISBN: 978-1-118-43407-9 (ebk) ISBN: 978-1-118-46390-1 (ebk) Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions. Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or pro- motional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the pub- lisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read. For general information on our other products and services please contact our Customer Care Department within the United States at (877) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002. Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with stan- dard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com. Library of Congress Control Number: 2012944689 Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Wrox Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other coun- tries, and may not be used without written permission. Visual Studio is a registered trademark of Microsoft Corporation. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc., is not associated with any product or vendor mentioned in this book. www.it-ebooks.info ffffiirrss..iinndddd vvii 1100//1188//22001122 66::1166::0044 PPMM I’d like to thank my wife, Ali, and my four children, Kyle, Cameron, Gillian, and Curtis, for their love and support. While they might not have written any of the words directly, they certainly helped create an environment where I could get my ideas out my head and into the computer. — Bruce Johnson www.it-ebooks.info ffffiirrss..iinndddd vviiii 1100//1188//22001122 66::1166::0044 PPMM CREDITS ACQUISITIONS EDITOR PRODUCTION MANAGER Mary James Tim Tate PROJECT EDITOR VICE PRESIDENT AND EXECUTIVE GROUP Kelly Talbot PUBLISHER Richard Swadley TECHNICAL EDITORS Joe Bennett VICE PRESIDENT AND EXECUTIVE PUBLISHER Andrew Moore Neil Edde PRODUCTION EDITOR ASSOCIATE PUBLISHER Christine Mugnolo Jim Minatel COPY EDITOR PROJECT COORDINATOR, COVER San Dee Phillips Katie Crocker EDITORIAL MANAGER PROOFREADERS Mary Beth Wakefi eld Jennifer Bennett, Word One New York Scott Klemp, Word One New York FREELANCER EDITORIAL MANAGER James Saturnio, Word One New York Rosemarie Graham INDEXER ASSOCIATE DIRECTOR OF MARKETING Johnna VanHoose Dinse David Mayhew COVER DESIGNER MARKETING MANAGER LeAndra Young Ashley Zurcher COVER IMAGE BUSINESS MANAGER © Eric Delmar / iStockPhoto Amy Knies www.it-ebooks.info ffffiirrss..iinndddd vviiiiii 1100//1188//22001122 66::1166::0044 PPMM

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.