Visual Studio 2008 可扩展性开发(九):总结篇

可以说木匠让小时的我第一次感受到了专业,虽然那时还不知道专业这个词,尤其是那些有年纪的老木匠,专注地在那锯木头、钉钉子、刨出带着香味的木花。他们有其他人所没有的工具,更重要的是他们掌握了那些工具。VS正是我们手头的工具,它可以是锤子,也可以是锯、刨子,如果你能掌握它,而且要掌握的好。

我向来喜欢了解手头工具的方方面面(也许与我的思维方式有关,总想了解得更多)。我甚至觉得,对于最常用的工具,了解得越多越好——今天掌握了一个小功能,未来两三年都会受益。

上面是我对工具的一点感想。VS越来越强大了,在VS 2010 Beta1中我又看到一直想要的两个功能,但我确信,扩展仍是不可避免的,因为VS面向的是所有的开发人员,它只能够提供最通用的功能,所以就有了这个文章系列。

在这个过程中,我尽量以有用的实例介绍VS 2008可扩展性开发的每个方面,我讨厌HelloWorld。在之前使用过的例子中,包括了园友、同事和自己的一些需求,下面列出随笔的链接:

(一):VS概览 
    简要介绍了VS的历史及其基本要素,帮助建立起对它的感性认识。

(二):Macro和Add-In初探 
    通过两个简单的例子来说明Macro和Add-In的开发。

(三):Add-In运行机制解析(上) 
    主要关注的是Add-In向导所产生的代码,其中的重点是Connect.cs和.Addin文件 
(三):Add-In运行机制解析(下) 
    主要介绍了VS Add-In的事件和生命周期。

(四):添加新的命令 
    首先介绍了命令和命令栏的概念,然后解释了如何添加、执行命令,以及如何执行VS内置的命令。

(五):操作Solution、Project和ProjectItem 
    介绍与解决方案、项目和文件(夹)相关的操作。

(六):操作Solution Explorer 
    解决方案管理器是VS中最重要的UI元素之一,本文就介绍对它的操作。

(七):操作文本编辑器 
    介绍如何对文本编辑器进行扩展。

(八):关于用户界面的种种(上) 
    首先是如何访问、操作那些内置的工具窗口,如Solution Explorer、Output Window等等;然后介绍了如何创建自定义的工具窗口 
(八):关于用户界面的种种(下) 
    为Add-In添加选项页(Options Page),设置菜单项的图标。

还有下面几篇相关的随笔:

谈谈VS中的模板
善用VS中的Code Snippet来提高开发效率
通过PropertyManager Add-In管理代码中的属性 
如果您下载的Add-In代码不能调试运行 
如何移除VS Add-In残留的菜单项 
给VS添加代码转换功能

其实,还有一个比较重要的主题没有写,就是CodeModel(比如代码中的命名空间、类、方法等等),但是找不到合适的例子,写了也只是些API介绍而已,只好作罢。

中间主要参考了两本书,开始是这一本《Professional Visual Studio® 2008 Extensibility》,说实话,这本书很一般,最多三星,基本上是API的介绍和HelloWorld的例子,但是VS可扩展性开发比较独立、单纯,当作参考手册来看看还是可以的,最好的参考是MSDN;第二本是《Working with Microsoft Visual Studio® 2005》,这本书还不错,有些地方对运行机制做了介绍,值得看一下。

很多朋友一听我说VS扩展开发,第一反应往往是,这玩意儿很复杂吧?完全不是。在写这些随笔的过程中,我感觉只要了解了基本的思路,开发起来跟普通应用的开发没什么差别,所以不要再因为觉得扩展复杂而放弃了:)

虽然这个随笔系列结束了,不过对VS的扩展仍然会继续,只要我觉得能够实现。希望这些能给你带来一些帮助。


本文转自一个程序员的自省博客园博客,原文链接:http://www.cnblogs.com/anderslly/archive/2009/05/30/vs-addin-summary.html,如需转载请自行联系原作者

作者:Nick Randolph, David Gardner 出版日期:July 28, 2008 出版社:Wrox Press 页数:1032 ISBN:ISBN-10: 0470229888 ISBN-13: 978-0470229880 文件格式:PDF 书籍简介 Product Description Professional Visual Studio 2008Microsoft Visual Studio 2008 is the latest version in the ongoing evolution of the Integrated Development Environment (IDE), and this resource examines the diverse facets of the IDE—from common tasks to intricate functions to the powerful tools that accompany the main code editing and design windows. Written by a unique author duo and offering an in-depth look at the powerful and fascinating features and techniques of the IDE, this book explores each aspect of the development life cycle from the perspective of how Visual Studio 2008 can make your life easier. Each chapter is packed with examples that illustrate uses for various tools, commands, and shortcuts of Visual Studio 2008. You will gradually learn to identify where a feature is used, conclude how you can use it to its fullest potential, and then seamlessly apply that feature to help solve real-world problems. What you will learn from this book How to create project templates and wizards Methods for using IntelliSense, code refactoring, class modeling, and unit testing Tips for using DataSets, LINQ, and Synchronization Services for working with data How to build web applications using ASP.NET AJAX, Silverlight, and ASP.NET MVC Ideas for building Office and Mobile applications, WPF, WCF, and WF projects Ways to effectively analyze and identify bugs using the advanced debugging features How to automate repetitive tasks using the Visual Studio 2008 add-ins and macros Suggestions for using Visual Studio Team System components coupled with Team Foundation Server Techniques for building more secure applications Who this book is for This book is for programmers who want to become proficient with the latest version of Visual Studio and are interested in the advanced capabilities of the IDE. Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job. From the Back Cover Professional Visual Studio 2008 Microsoft Visual Studio 2008 is the latest version in the ongoing evolution of the Integrated Development Environment (IDE), and this resource examines the diverse facets of the IDE—from common tasks to intricate functions to the powerful tools that accompany the main code editing and design windows. Written by a unique author duo and offering an in-depth look at the powerful and fascinating features and techniques of the IDE, this book explores each aspect of the development life cycle from the perspective of how Visual Studio 2008 can make your life easier. Each chapter is packed with examples that illustrate uses for various tools, commands, and shortcuts of Visual Studio 2008. You will gradually learn to identify where a feature is used, conclude how you can use it to its fullest potential, and then seamlessly apply that feature to help solve real-world problems. What you will learn from this book How to create project templates and wizards Methods for using IntelliSense, code refactoring, class modeling, and unit testing Tips for using DataSets, LINQ, and Synchronization Services for working with data How to build web applications using ASP.NET AJAX, Silverlight, and ASP.NET MVC Ideas for building Office and Mobile applications, WPF, WCF, and WF projects Ways to effectively analyze and identify bugs using the advanced debugging features How to automate repetitive tasks using the Visual Studio 2008 add-ins and macros Suggestions for using Visual Studio Team System components coupled with Team Foundation Server Techniques for building more secure applications Who this book is for This book is for programmers who want to become proficient with the latest version of Visual Studio and are interested in the advanced capabilities of the IDE. Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值