┏━┓┏━┓
┃┃┃┃┃┃
┏┛┃┗┛┃━┓
┃ ┃
┃━━ ﹏ ━━ ┃★*★.. ★*★.. ★*★.. ★*★.. ★*★.. ★*★..
┗━━━━━━┛
小说下载尽在 http://bbs.txtnovel.com---书香门第【GYRF】整理附:
【本作品来自互联网,本人不做任何负责】内容版权归作者所有!
Professional
Visual studio. 2010
introduction xxxix
chaPter 1 A Quick Tour 3
chaPter 2 The Solution Explorer, Toolbox, and Properties 15
chaPter 3 Options and Customizations 33
chaPter 4 The Visual Studio Workspace 53
chaPter 5 Find and Replace and Help 73
chaPter 6 Solutions, Projects, and Items 89
chaPter 7 IntelliSense and Bookmarks 119
chaPter 8 Code Snippets and Refactoring 137
chaPter 9 Server Explorer 159
chaPter 10 Modeling with the Class Designer 175
chaPter 11 Unit Testing 191
chaPter 12 Documentation with XML Comments 219
chaPter 13 Code Consistency Tools 245
chaPter 14 Code Generation with T4 263
chaPter 15 Project and Item Templates 291
chaPter 16 Language-Specific Features 311
chaPter 17 Windows Forms Applications 335
chaPter 18 Windows Presentation Foundation (WPF) 351
chaPter 19 Office Business Applications 379
chaPter 20 ASP NET Web Forms 399
chaPter 21 ASP NET MVC 437
chaPter 22 Silverlight 471
chaPter 23 Dynamic Data 485
chaPter 24 SharePoint 513
chaPter 25 Windows Azure 533
chaPter 26 Visual Database Tools 549
chaPter 27 DataSets and DataBinding 559
chaPter 28 Language Integrated Queries (LINQ) 587
chaPter 29 The ADO NET Entity Framework 621
chaPter 30 Reporting 645
chaPter 31 Windows Communication Foundation (WCF) 681
chaPter 32 Windows Workflow Foundation (WF) 701
chaPter 33 Client Application Services 725
chaPter 34 Synchronization Services 745
chaPter 35 WCF RIA Services 757
chaPter 36 Configuration Files 773
chaPter 37 Connection Strings 795
chaPter 38 Resource Files 805
chaPter 39 Using the Debugging Windows 827
chaPter 40 Debugging with Breakpoints 845
chaPter 41 DataTips, Debug Proxies, and Visualizers 857
chaPter 42 Debugging Web Applications 871
chaPter 43 Advanced Debugging Techniques 887
chaPter 44 Upgrading with Visual Studio 2010 905
chaPter 45 Build Customization 911
chaPter 46 Assembly Versioning and Signing 929
chaPter 47 Obfuscation, Application Monitoring, and Management 937
chaPter 48 Packaging and Deployment 961
chaPter 49 Web Application Deployment 983
chaPter 50 The Automation Model 1001
chaPter 51 Add-Ins 1009
chaPter 52 Macros 1025
chaPter 53 Managed Extensibility Framework (MEF) 1033
chaPter 54 Visual Studio Ultimate for Architects 1061
chaPter 55 Visual Studio Ultimate forDevelopers 1075
chaPter 56 Visual Studio Ultimate for Testers 1095
chaPter 57 Team Foundation Server 1111
index 1139
Professional
Visual studio. 2010
Nick Randolph
David Gardner
Michael Minutillo
Chris Anderson
Professional Visual studio. 2010
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright . 2010 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-54865-3
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 specifically disclaim all warranties, including
without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or
promotional 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 publisher 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 also publishes its books in a variety of electronic formats. Some content that appears in print may not be available
in electronic books.
Library of Congress Control Number: 2010922566
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 affiliates, in the United States and other
countries, and may not be used without written permission. Visual Studio is a registered trademark of Microsoft
Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners.
Wiley Publishing, Inc. is not associated with any product or vendor mentioned in this book.
To my beautiful Cynthia
—Nick Randolph
To my wife Julie
—David Gardner
For Barbara, amore sempre
—Michael Minutillo
For my parents, Michael and Narelle
—Chris Anderson
about the authors
nick randolPh currently runs Built To Roam which focuses on building rich mobile applications.
Previously, Nick was co-founder and Development Manager for nsquared solutions where he led a
team of developers to build inspirational software using next wave technology. Prior to nsquared,
Nick was the lead developer at Intilecta Corporation where he was integrally involved in designing
and building their application framework.
After graduating with a combined Engineering (Information Technology)/Commerce degree, Nick
went on to be nominated as a Microsoft MVP in recognition of his work with the Perth .NET user
group and his focus on mobile devices. He is still an active contributor in the device application
development space via his blog at http://community.softteq.com/blogs/nick/ and via the
Professional Visual Studio web site, www.professionalvisualstudio.com/.
Nick has been invited to present at a variety of events including Tech Ed Australia, MEDC and
Code camp. He has also authored articles for MSDN Magazine (ANZ edition), two books entitled
Professional Visual Studio 2005 and Professional Visual Studio 2008, and helped judge the 2004,
2005, 2007 and 2008 world finals for the Imagine Cup.
daVid Gardner is a seasoned.NET developer and the Chief Software Architect at Intilecta
Corporation. David has an ongoing passion to produce well-designed, high-quality software
products that engage and delight users. Since the mid 90s, He has worked as a solutions architect,
consultant, and developer and has lent his expertise to organizations in Australia, New Zealand,
and Malaysia.
David is a regular speaker at the Perth .NET user group and has presented at events including Microsoft
TechEd and the Microsoft Executive Summit. He holds a Bachelor of Science (Computer Science) and
is a Microsoft Certified Systems Engineer. David was co-author of Professional Visual Studio 2008, and
blogs about Visual Studio and .NET at www.professionalvisualstudio.com.
Michael Minutillo is a .NET software engineer with a Bachelor of Science degree in Computer
Science. A self-described “Indiscriminate Information Sponge,” he started writing .NET software
in early 2000 to fund his university studies and has been an active member of the .NET community
ever since.
Michael is a regular attendee at the Perth .NET Community of Practice where he has given
presentations on the new features of C#, ASP.NET MVC and Test-Driven Philosophy. In 2009
Michael started the Perth ALT.NET User Group which meets monthly to discuss software
engineering tools and practices in the .NET development space.
Michael maintains a technical blog at http://wolfbyte-net.blogspot.com and can be contacted
at http://twitter.com/wolfbyte.
chris anderson has been a professional developer for over 10 years, specializing in building
desktop, Web, and mobile business applications using Microsoft technologies for industries
as wide ranging as accounting, property valuation, mining, the fresh produce industry, pet
cremations, logistics, field services, sales, and construction. He holds a Bachelor of Engineering
in Computer Systems with a Diploma in Engineering Practise. Chris is a co-owner of Peer
Placements (a specialist recruitment firm for software developers) in addition to working as a
consultant and author. Currently specializing in Silverlight (particularly in relation to building
business applications in Silverlight), Chris has spoken on this topic at Code Camp Australia
2009, TechEd Australia 2009, Silverlight Code Camp Australia 2010, and numerous Sydney
Silverlight Designer and Developer Network (SDDN) meetings for which he is a co-organizer.
Chris maintains a blog at http://chrisa.wordpress.com and can be found on Twitter at
http://twitter.com/christhecoder.
about the technical editor
Joe bennett has been consulting as a developer and software solutions architect for more than
20 years and has been working with .NET exclusively since the beta for version 1.0. He is passionate
about building well-architected, robust software for organizations of all sizes, and loves sharing his
knowledge and experience with other developers.
Joe is the Chief Software Architect at Carolina Software Consultants, LLC and a past President of the
Triangle .NET User Group located in the Triangle area of North Carolina. He frequently speaks at
meetings and events and holds a Bachelor of Science degree in Computer Science from the University
of Houston.
credits
acquisitions editor Vice President and executiVe GrouP
Paul Reese Publisher
Richard Swadley
ProJect editor
Kelly Talbot Vice President and executiVe Publisher
Barry Pruett
technical editor
Joe Bennett associate Publisher
Jim Minatel
Production editor
Eric Charbonneau ProJect coordinator, coVer
Lynsey Stanford
coPy editor
Kim Cofer Proofreaders
Scott Klemp and Beth Prouty, Word One
editorial director
Robyn B Siesky indexer
Johnna Vanhoose Dinse
editorial ManaGer
Mary Beth Wakefield coVer desiGner
Michael E Trent
associate director of MarketinG
David Mayhew coVer iMaGe
. Eric Delmar/istockphoto
Production ManaGer
Tim Tate
acknowledGMents
the Process of writinG this book for Visual Studio 2010 has been frustrating at times; however,
the journey of investigating new or forgotten features has reignited my passion for being a developer
and working with one of the premiere development tools on the market. As with the previous two
editions, this was a time-demanding exercise and I must again thank my partner, Cynthia, who
consistently encouraged me to “get it done,” so that we can once again have a life.
I would especially like to thank everyone at Wrox who has helped me re-learn the art of technical
writing—in particular, Kelly Talbot, whose attention to detail has resulted in consistency
throughout the book despite there being four authors contributing to the process, and Paul Reese
(whose ability to get us back on track was a life-saver), who made the whole process possible.
I have to pass on a big thank you to my co-authors, Dave, Mike and Chris, who agreed to work
with me on this edition. I doubt that I really gave an accurate representation of exactly how much
work would be involved, and I really appreciated having co-authors of such high caliber to bounce
ideas off of and share the workload.
Lastly, I would like to thank all of my fellow Australian MVP developers and the Microsoft staff,
who were always able to answer any questions along the way.
—Nick Randolph
writinG a book is without a doubt among the most rewarding and challenging activities I’ve
ever undertaken. I thought it would be easier the second time around, but alas I was quickly proven
wrong. However, in the process I have amassed a wealth of knowledge that I never would have
found the time to learn otherwise.
The production behind this book is significant, and I am especially thankful to the team at Wrox
who worked tirelessly behind the scenes to bring it to fruition. Without Paul Reese and Kelly Talbot
working as hard as they did to cajole the next chapter out of us, we never would have gotten this
finished. It was a pleasure to be in such experienced hands, and I thank them for their patience and
professionalism.
A huge thank you goes to my co-authors Nick Randolph, Michael Minutillo, and Chris Anderson,
whose excellent contributions have improved this book significantly over the previous edition.
I enjoyed collaborating on such a big project and the ongoing conversations about the latest cool
feature that we’d just discovered.
My appreciation and thanks go to Gabriel Torok, Bill Leach, and Mike Moores from PreEmptive