.NET2005都有哪些新功能?谁能给我讲一讲啊?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了.NET2005都有哪些新功能?谁能给我讲一讲啊?相关的知识,希望对你有一定的参考价值。

据说.NET2005增加了好多的新功能,不知道有没有那为高手目前在用它或者是用过的,能不能给小弟将一下,2005有那些新的功能,我对2005的团队开发的代码管理很感兴趣!

Visual Studio 2005 新特性
Posted on 2005-05-14 14:26 yang_sy 阅读(308) 评论(0) 编辑 收藏 收藏至365Key 所属分类: visual studio
简介
技术的发展随着人们的技术需求,这对于Visual Studio也是一样的,Visual Studio 2005的目标是针对开发程序因此增加了许多的新特点以开发的过程,这篇文章的目的是介绍Visual Studio2005的一些相关的变化

Productivity features

The first time that you start Visual Studio, it asks to make a selection from a list of predefined settings. Any further customizations made to the IDE, such as adding a shortcut key combination or changing the docking location of a window, are tracked and stored along with the predefined settings.

These settings cab be reset by choosing Import/Export Settings on the Tools menu as shown below.

Settings can be stored in a file and the same file can be exported to other system to get the same settings. The Import/Export Setting dialogue box is available on the Tools menu.

Using the advanced settings related features in VS 2005 we can achieve following:

Save the settings in a file so the same can be used in other machine
As the settings can be stored in a file and shared with other team members
While exporting the setting to a file, the same is saved in a .vssettings file. Some setting information contain computer related information which may expose a security risk, we need to be careful about the same while exporting. Such settings are identified by information icon while exporting and VS will warn about the potential security threat while exporting such settings.

While importing the settings from a .vssetting file, the settings on the current machine are overridden.

In a team of developer the .vssetting file can be placed in a network place and the same can be used by whole team.

Apart from above setting related features, following new Task List features are also provided in VS 2005
Text Display: Multiple lines of text can be displayed in any row.
Column Sorting: Sort triangle has been added to the column headers for sorting purpose
Multiple Sorting: User can sort on multiple columns now.
Move Columns: User can move columns by drag and drop
Show Files: Only file name is displayed by default and not the full path, to display full path use Tools->Options->Environment->Show files without Path
Editing Code

Numerous features are added in VS 2005 to make the editing of code/html/XML simpler. Along with these enhanced editing capability, various new controls are also added to make the development more simplified and productive. These new features are discussed below.

Text Editor

1. Line Revision Marks: This allows the user to see the edits done by him in the current IDE session. Edited lines and lines adjacent to them are marked. Yellow margin indicates that the edited line is not yet saved; Green margin indicates that the line was edited before last save as shown below.

The coloring schema can be customized based on user抯 preference. The highlighting feature can be turned off by deselecting "Track Changes" on the General tab of the Text Editor page in the Options dialog box.

2. Bookmark window: Using this option user can manage bookmarks (naming bookmarks, re-ordering bookmarks etc). This option can be exercised from Tools -> Bookmark Window.

3. Smart tags: These tags are very similar to Office XP smart tags and help the user to correct some common errors. This feature is only available in VB.Net

4. Code Snippets: These are ready to use code snippets which can be used in a VB.Net, C# or J# project. User can add custom code snippets using the Code Snippet Manager from the Tools menu.

5. AutoRecover: As the name indicates, this feature helps to recover the changes done by automatically saving the code every 5 minutes. User can customize the AutoRecover options in the Options dialog box.

Web Page and HTML Designer

Visual Studio provides Visual Web Developer which makes the development of ASP.NET Web pages and HTML pages very productive. It allows the developer to create and maintain Web sites as local folders, in Internet Information Services (IIS), or FTP Server or SharePoint server. There are many new controls included in ASP.Net to make the development task easy and faster.

The HTML editor provides better control over the format of all HTML and of ASP.NET markup. Also formatting is preserved as is when switching views.

An improved IntelliSense feature provides better productivity. An improved code behind model for ASP.Net pages simplifies the process of creating web pages.

XML Editor

This new editor with color coding and IntelliSense support makes the editing of XML files very easy. This editor supports syntax checking, validation using DTD and XSD, ability to create XML schema, ability to convert DTD or XDR to XML schema and XSLT 1.0 syntax checking features.

Refactoring

This feature (available only in C# and J#) helps the developer to improve the quality of code by restructuring it internally. Following are the options available on the Refactoring Menu.

1. Extract Method: This is to split a method into many fine grained methods which are reusable.

2. Rename: This is used to rename an identifier i.e. field, variable, method etc.

3. Encapsulate Fields: Creating a property to encapsulate a field.

4. Extract Interfaces: Creating an interface which is implemented by current class.

5. Promote Local Variable to Parameters: Moving a local variable to parameter level.

6. Remove Parameters: Removing parameters from methods, indexers, constructors, delegates.

7. Reorder Parameters: Changing the order of parameters.

8. Generate Method Stub: Automatic code generation based on the consumption of a method.

9. Add Using Unbound Types: Automatic inclusion of namespace for an unbound type.

Solutions and Project related features

1. Test Projects: This option is very useful for experimenting etc. User can just create a temporary project and start coding without saving it.

2. Stand-alone projects: This is applicable for solution which has only one project. User will not see the solution in the Solution Explorer as well as the commands that act on solutions. However the solution files are still created.

3. Simplified Build: This option provides build option similar to Visual Basic 6.0. This is a useful option for VB programmers.

4. Solution Folders: This is a useful option for complex solutions. This helps the developer to organize projects in different folders in Solution Explorer.

5. Project Properties: This is the central location for all project properties and settings. This provides improved access to resources and strong-name signing within the IDE. This option can be accessed from Project ?Project Properties.

6. Referencing an EXE: This feature helps the developer to reference an .EXE file from the code. This is used to access the class files which are inside an .EXE file.

7. Visual Studio Conversion Wizard: Using this option, developers can convert their projects in Visual Studio .NET 2002 or Visual Studio .NET 2003 to Visual Studio 2005. While converting, this provides an option to create a backup of the solution or project.

8. Create Project from Existing Code Files Wizard: This wizard helps to create a Visual Studio project by adding existing code files.

9. Solution and Project Platform Targeting: This feature provides and option to select the platform to build the solution or add new solution platforms or and edit existing solution platforms.

10. Starter Kits: This is an enhanced project template, which includes code samples (which can be compiled), documentation, and other required resources to learn new tools and programming techniques for building applications.

11. Projects and Solutions options: This feature contains separate pages for General and Build and Run options.

12. Custom Project and Project Item Templates: This feature allows creation or modification of custom template for projects or project items. These custom templates appear in the New Project dialog box and Add New Item dialog box. These templates contain a project file, code files and an XML file containing metadata for the template, which is used by Visual Studio to define how to display and create the project in the development environment. These files are compressed in a .zip file so that it can easily be shared with others.

Building, Debugging and Deployment

This section discusses new features provided in VS 2005 for building, debugging and deploying applications.

Building

VS 2005 introduces a new xml based transparent build system for all managed client application called MS.Net Build Engine (MSBuild). Developers can specify the as what to build and how to build under different platforms and configurations in the XML file associated with the build engine. Also they can author re-usable rules to achieve consistent builds across projects. The MSBuild build process is defined by atomic units of build operation (tasks) which can be re-authored by the developers in any .Net languages. However MSBuild cannot be used to build Web projects, deployment projects, and Visual C++ projects.

Debugging

1. Edit and Continue: This feature is only supported in VB.Net. This allows the developer to edit the code while debugging the application (Like in Visual Basic).

2. More Secure Remote Debugging with Simpler Setup: This feature provides setting up remote debugging by just copying a single executable to the remote machine. Also the remote debugging is more secure and robust. Apart from this, developers can also debug 64-bit managed and unmanaged applications.

3. Visualizers: This is a very useful feature. It can be launched from a Watch window or from the new enhanced DataTips and enables viewing of data in an intuitive and natural format i.e. now a string can be viewed as an HTML or an XML document. Also developers can write their own visualizers.

4. Just My Code Debugging: This feature allows the developer to debug the code written by him only.

5. Tracepoints and Improved Breakpoint UI: Tracepoints are a new way of using breakpoints to perform a custom action i.e. displaying a messagebox or executing a Visual Studio automation macro to determine whether to break or continue when it hits a tracepoint. The user interface is also enhanced to set these breakpoints easier and faster.

6. Better Tools for Multiprocess Debugging: Now developers can see all processes attached to for debugging in the Processes window. Breakpoint can be attached to a specified processes, threads, and machines. Attach to Process dialog box is simplified and attached processes information is moved from the dialog box to the Processes window.

7. Exception Assistant: This feature provides more precise information when exception occurs. This feature is only applicable for Visual Basic.Net, C# and J#.

8. Improved Support for Managing Debug Information: Better support for symbol server and diagnostic messages for troubleshooting debug information.

9. Debugging Code at Design Time: This feature provides debugging option at design time using the Immediate window.

10. Support for XSLT Debugging: This feature enables setting breakpoints within style sheets and viewing XSLT execution state etc. It also supports debugging a style sheet or an XSL transform invoked from another application.

Deployment

1. ClickOnce Deployment: It enables deployment of self-updating Windows and Command Line Applications that can be installed and run as easily as Web applications from Publish <Project> command on the Build menu as shown below.

On clicking the Publish <Project> option, it displays a Publish Wizard, which will guide the user thru the whole process.

2. Bootstrapping Prerequisites: This feature enables the inclusion of system perquisites components i.e. .NET Framework runtime as a part of a deployment project or ClickOnce deployment.

3. Windows Installer Deployment: Several new features have been included in the Setup and deployment projects i.e. ability to choose between per-user or per-machine installation, support for 64-bit deployment, and deployment to Web Servers that host multiple Web sites.

Automation

1. XML Add-in Registration: Developers can use XML files to define the registration settings for add-ins and then placing in the right folder for Visual Studio to find and load your add-in.

2. DTE2.Toolwindows: The new T:EnvDTE80.ToolWindows object (also available as the P:EnvDTE80.DTE2.ToolWindows property) improves the discoverability and usability of tool windows in the object model by providing easy access to the tool windows in the IDE in their native types. Visual Studio tool windows can also be accessed through member properties. Other tool windows may be located with the M:EnvDTE80.ToolWindows.GetToolWindow function.

3. DTE.Toolwindows.CreateToolWindow2 : It creates a new tool window and hosts a user-defined control in it thereby avoiding the usage of. A shim control is no longer required.

4. Managed code add-ins: The Add-in wizard now supports Managed Visual C++, and now support getting resources from managed satellite DLLs.

5. Managed tools options: Several new options on the Tools menu are provided for managed code.

6. Add-In Wizard: The Add-In Wizard supports creating add-ins using Visual J#.

7. KeyPress events: The Editor automation model offers a new T:EnvDTE80.TextDocumentKeyPressEvents object which has two events to handle keystroke entries in the Editor: E:EnvDTE80.TextDocumentKeyPressEventsClass.BeforeKeyPress and E:EnvDTE80.TextDocumentKeyPressEventsClass.AfterKeyPress.

8. InsertNewLine method: The Editor automation model offers a new M:EnvDTE80.EditPoint2.InsertNewLine method to insert lines in the Editor.

9. Solution Folders: This feature enables organizing large and complex application, now projects can be included in a sub folder in a solution.

10. Task List default navigation: It enables navigating directly to lines in the code by double-clicking items in the Task List.

11. Synchronous Find: The Find object offers a new property, P:EnvDTE80.Find2.WaitForFindToComplete to specify whether the search is performed synchronously or asynchronously.

12. Tool window command bar support: Some tool windows include a toolbar for accessing its functionality. Although these toolbars are not available from the P:EnvDTE80.DTE2.CommandBars collection, they are available on the Window object of the tool window.

13. Enhanced AddNamedCommand: An additional parameter in M:EnvDTE80.Commands2.AddNamedCommand2 is included to specify the style of the button, such as text only, icon only, text, and icon. Additional types of controls can also be created to place in the toolbars and menus, such as list box controls, edit box controls, and drop-down menu controls.

14. Localization: Sample macros are localized, and the Add-In Wizard now generates add-ins with the appropriate language i.e. for running Japanese Visual Studio, add-ins are created using the Japanese templates (if they are available).

15. Add-In and Macro Security: Now Developers can specify whether macros are allowed to run, whether add-ins are allowed to load, and where Visual Studio searches for .Addin configuration files.

16. Code Model Consistency: All the programming languages in Visual Studio use more of the core code model than previous versions, making for a more consistent programming experience.

17. Code Model Events: This feature enables the developer to track and respond to changes happening in the code.

18. Core Model Additions: A new assembly called EnvDTE80 contains a number of new automation members.

19. Language Model Additions: A new assembly called VSLangProj80 contains a number of new automation members for Visual Basic and Visual C#.

20. New Documentation for the IVSS Automation Model: The automation model for Visual SourceSafe, known as IVSS, now has documentation.

21. More Code Snippets: The Help topics for the various automation object models now contain more example code, many of them containing both Visual Basic and Visual C# snippets.

Help

1. Help viewer default: Help displays in an external Help viewer i.e. Microsoft Document Explorer, by default rather than inside the IDE.

2. How Do I page: It contains a list of task topics, organized by category and subcategory, for a subset of the documentation set of a product. This helps to quickly locate information by subject area.

3. Community integration: This feature enables access to forums and newsgroups directly from within Help.

4. Search: Search results now display an abstract for each topic. In addition, icons appear at the bottom of the topic abstract that provide additional information such as the programming language a topic applies to, as well as the topic source.

Enterprise Template and Policies

A new XML schema for the policy description language is included which replaces the Template Description Language. It is used to define policies that can be applied to a project or to a Solution Folder. Templates and policies created in previous versions of Visual Studio can be converted to work in this release.

References

http://msdn2.microsoft.com/library/default.aspx
http://msdn2.microsoft.com/library/3y217xaz.aspx
http://msdn2.microsoft.com/library/fx6bk1f4.aspx
http://msdn2.microsoft.com/library/xc52cke4.aspx

While exporting the setting to a file, the same is saved in a .vssettings file. Some setting information contain computer related information which may expose a security risk, we need to be careful about the same while exporting. Such settings are identified by information icon while exporting and VS will warn about the potential security threat while exporting such settings. While importing the settings from a .vssetting file, the settings on the current machine are overridden. In a team of developer the .vssetting file can be placed in a network place and the same can be used by whole team. Apart from above setting related features, following new Task List features are also provided in VS 2005 Numerous features are added in VS 2005 to make the editing of code/HTML/XML simpler. Along with these enhanced editing capability, various new controls are also added to make the development more simplified and productive. These new features are discussed below. 1. Line Revision Marks: This allows the user to see the edits done by him in the current IDE session. Edited lines and lines adjacent to them are marked. Yellow margin indicates that the edited line is not yet saved; Green margin indicates that the line was edited before last save as shown below.

While exporting the setting to a file, the same is saved in a .vssettings file. Some setting information contain computer related information which may expose a security risk, we need to be careful about the same while exporting. Such settings are identified by information icon while exporting and VS will warn about the potential security threat while exporting such settings. While importing the settings from a .vssetting file, the settings on the current machine are overridden. In a team of developer the .vssetting file can be placed in a network place and the same can be used by whole team. Apart from above setting related features, following new Task List features are also provided in VS 2005 Numerous features are added in VS 2005 to make the editing of code/HTML/XML simpler. Along with these enhanced editing capability, various new controls are also added to make the development more simplified and productive. These new features are discussed below. 1. Line Revision Marks: This allows the user to see the edits done by him in the curr
参考技术A 重点的是,更进一步的提高程序的性能,和缩短代码量,让程序员更方便的同数据库操作时尽量可以不写代码!

以上是关于.NET2005都有哪些新功能?谁能给我讲一讲啊?的主要内容,如果未能解决你的问题,请参考以下文章

谁能给我讲 TCP/IP

js除了有JQuery框架以外,还都有哪些强大点的框架,或者比较实用的也可以。。 谁能给我介绍一下?

谁能帮我讲一下 Java中的引用类型和引用变量

不是说形参的改变不影响实参吗?为什么有时候影响,有时候又不影响啊!谁能给我讲明白这到底是怎么回事啊

谁能给我解释一下,开发者选项里的每一项都有啥用?如图

谁能给我说下国内开源的PHPCMS都有啥样的缺点与优势?例如:dede、php168、帝国、phpcms等。详细点最好