Cool Features I Like About Visual Studio 2005 "Whidbey"
2004-08-23 09:25
387 查看
Introduction
A few hours ago, I installed Visual Studio 2005, aka "Whidbey." So, I thought, "why not share this knowledge with you guys?" In this article, I will share my first Whidbey experiences with you. We will go through the installation process together. I will also present some screenshots that are important to the new features. After that, we will start Visual Studio for the first time and see the new features. I have not started Visual Studio yet because I want to do this together with you.Installing Whidbey
It took me approximately 50 minutes to install Whidbey on my laptop. My laptop contains an AMD Mobile processor with 1.4 GHz and 512 MB RAM. The following components were installed:Component | Space Required |
Microsoft Data Access Components 9.0 | 3.10 MB |
Microsoft .NET Framework 2.0 | 137.00 MB |
Microsoft Visual J# .NET Redistributable Package 2.0 | 49.50 MB |
Microsoft Visual Studio Enterprise Architect Edition 2005 | 1.67 GB |
Installation | Space Required |
Full | 1.9 GB |
Custom | Depends on your choice |
Scoped (recommended) | 412 MB |
Uninstalling Whidbey
Uninstalling Visual Studio didn't take much time—only 18 minutes and it was gone. The uninstaller removed most installed components except the Microsoft Data Access Components. If you try to uninstall this component via the Add/Remove Programs panel, you will see a window with two options. The first one helps you to re-install this component and the second one, to remove, is not selectable. It shows the following message, "Remove (use mdacrb.exe to do remove)", which is at the following location:C:/Program Files/Common Files/Microsoft Shared/MDAC Rollback/
Uninstalling this component took only five minutes. If you uninstall Visual Studio, don't be surprised that MSDN is still on your HD. Uninstalling MSDN also took me only five minutes. Of course, this depends on which option you chose when you installed the MSDN.
The Look and Feel of Visual Studio 2005 ("Whidbey")
Now that we have discussed the installation and requirement issues for Visual Studio 2005 ("Whidbey"), let us start Visual Studio for the first time. When you start Visual Studio for the first time, you will see the following window:![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image.jpg)
Here, you will have to choose your primary development language before Visual Studio can start. After selecting the language, you will see the new IDE. The new IDE does not contain any welcome window with your projects, as in Visual Studio .NET 2003. The new look of the IDE is really nice; nevertheless, you need to get used to it, especially with the dark-grey colors.
![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image2.jpg)
Docking Windows
While playing with the IDE, I discovered a very cool feature. When you drag the output bar, some arrows appear in the middle, top/bottom, and left/right. Just drop the output bar over one of the arrows and it will be placed there. This can be done with any bar you can see in the IDE, whether it is the solution explorer, the dynamic help, or anything else—it does not matter.![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image3.jpg)
Do you see the hidden toolbox in the screenshot above, on the left side? This is a feature that also applies to each bar. Just right-click on any bar and select auto hide; it will disappear if you don't need it! For example, if you need the solution bar, just hover over the hidden bar and it will appear.
Intellisense/Intellitasks
I heard a lot of hype about the extended features of Intellisense in Visual Studio 2005, but unfortunately I could not get them to work for me. A simple CTRL + Space didn't work! I could not understand the problem. However, the solution was simple. After installing Visual Studio, I didn't reboot my system. After a reboot, the CTRL + Space key combination worked.Intellisense is not a new a feature in Visual Studio; however, it is extended. For example, Intellisense also will be available in the web.config files.
Intellitasks are new in this version. Intellitasks enable you to use common code in your projects. At first, I didn't get how they work, but after some research on the Net, it was clear. For example, you can type for and press the Tab key two times; the specified code snippet for the shortcut will be added to your code. If you want to add your own snippet to the Intellitask feature, you can do it through the Code snippet manager (Tools menu -> Code snippets manager). You define your own snippet within an XML file. If you haven't seen a defined snippet before, here is the Class snippet:
<?xml version="1.0" encoding="utf-8" ?> <CodeSnippet Format="1.0.0"> <Header> <Title>class</Title> <Shortcut>class</Shortcut> <Description>Expansion snippet for class</Description> <SnippetTypes> <SnippetType>Expansion</SnippetType> <SnippetType>SurroundsWith</SnippetType> </SnippetTypes> </Header> <Snippet> <Declarations> <Literal default="true"> <ID>name</ID> <ToolTip>Class name</ToolTip> <Default>MyClass</Default> </Literal> </Declarations> <Code Language="csharp" Format="CData"><![CDATA[class $name$ { $selected$$end$ }]]> </Code> </Snippet> </CodeSnippet>
Refactor
Refactor is also a very nice feature. With Refactor, you can extract methods, encapsulate fields, reorder parameters, remove parameters, surround with common statements, insert expansions, and much, much more.Let's take a look at extract method. With this feature, you can mark some code and create a new function. The marked code then will be moved to the new function and the new function will be called from the place where the original code was placed. To achieve this, mark the desired code, press the right mouse button, and select Extract Method from the Refactor menu—as shown in the following screenshot.
![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image4.jpg)
After that, a new window will appear where you can enter the new name of the function. You cannot change the function to public nor you can add parameters to the function. If you want to do this, you have to edit the function manually. All you can specify is the name of the function.
![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image5.jpg)
After pressing the OK button, your code should be changed to the following:
![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image6.jpg)
As you can see, this is a very useful feature, especially when you need to move your existing code from one function to a new one. Another useful feature is Surround With. It allows you to surround some code with some common code statements, such as if..else, try..catch, and so forth. So, if, for example, you have the following code:
![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image7.jpg)
and use the menu shown in the screenshot above, you will get the following result.
![](http://blog.csdn.net/images/blog_csdn_net/waterboy/33305/r_get_image8.jpg)
There is also feature called rename; it lets you rename your objects, variables, and so on. To learn a bit more about the rename feature, let's consider an example. When I first worked with this feature, I created a variable in my class—outside of a function. Then, I placed an initialization in a function called "Form1". After that, I used the feature on the declaration and what happened is that it only changed the declaration name, not the variable name in the function. After playing a bit more with that feature, I placed the declaration also in the Form1 function and again used the feature. This time, both variable names were changed.
Conclusion
This was just a short introduction to what I have done so far with Visual Studio 2005. However, there are many more features included and, to describe all of them, I would need to write a book. I hope that you all have enjoyed the first view and experience with Visual Studio 2005, aka Whidbey.Copyright © Sonu Kapoor 2004. All rights reserved by Sonu Kapoor.
About the Author
Sonu Kapoor has worked with many technologies - like VC++, VC++.NET, ASP, ASP.NET, C# etc.. Besides his programming passion he is a regular column writer for CodeGuru.com and Developer.com. He is currently working as a content editor at XMLPitstop.com - A very large XML resource. Visit his blog for some of his latest thoughts and work.
相关文章推荐
- 您会收到一个安装程序检测到另一个程序需要重新启动计算机"的错误消息时您尝试安装 Visual Studio.net 或 Visual Studio 2005
- sql 2005提示未能加载包"Microsoft SQL Management Studio Package "
- [转]Visual Studio .NET "目标平台" 说明
- 关于"插入Microsoft Visual Studio .Net Enterprise Architect 2003”的说明
- 解决android studio ADB无响应的问题:If you'd like to retry,then please manually kill "adb.exe"
- "My History of Visual Studio" 阅读笔记
- The article discusses a couple of new features introduced for assemblies and versioning in Visual Studio 2005.
- 使用Microsoft® .NET Framework 3.0 and Visual Studio® 2005开发的免费课程
- "Visual Studio .NET已检测到指定的Web服务器运行的不是ASP.NET 1.1 版..."的解决办法
- Visual Studio Codename "Orcas" Express Edition beta 1下载
- Setup Was Unable to Create a DCOM User Account" Error Message in Visual Studio 6.0
- 解决Visual studio"创建或打开C++浏览数据库文件***发生错误”的问题
- Visual Studio® 2005 Team System Overview
- Microsoft SQL Server 2005提示未能加载包"Microsoft SQL Management Studio Package "
- Visual studio csc.exe及"由于未能创建 Microsoft Visual C# 2008 编译器,因此未能打开项目 ..."的解决方法
- cmake 编译opencv 出现 The C++ compiler "C:/Program Files/Microsoft Visual Studio 10.0/VC/bin/cl.exe
- Visual Studio Code Name "Orcas" Express Editions
- Using Nuget in Visual Studio 2005 &amp; 2008
- vs .net 2005 打开VSS项目时出现:"could not find the visual sourcesafe internet web service connection"的解决方案
- 读书札记:#include&quot;stdafx.h&quot; 问题的解决--Microsoft Visual Studio 2008之C++