Professional Documents
Culture Documents
When you make the decision to upgrade to Visual Studio 2010, your existing applications must be converted to work with Visual Studio 2010 before they can be opened. In most cases, the conversion process doesnt change your code. Instead, it merely updates configuration files, such as project and solution files. The changes that are made depend on whether youre converting
114
Windows applications Web applications Class libraries Visual Studio 2010 uses version 4.0 of the .NET Framework by default. The syntax of programming languages, such as C# and Visual Basic, may change with each new version of the .NET Framework as new features are added and existing features are improved. The conversion process doesnt update your code to the latest syntax. Rather, the newer versions of .NET continue to support the syntax of previous versions for example, upgrading versions of .NET doesnt break existing code. Its up to you to figure out whether a new and improved syntax is available and decide whether you want to change your code to use the new syntax. The languages add features in most cases, rather than actually change existing features. In most cases, the changes are slight, rather than major code busting features. When you make the decision to upgrade to Visual Studio 2010, you have lots of choices. In the sections that follow, you find out more specifics about what happens to code when you upgrade, alternatives to upgrading, and what you need to do to upgrade programs in pre-.NET languages.
Upgrading .NET
115
Clients running your applications must have the .NET 4.0 framework installed. You can convert your applications to work with Visual Studio 2010 and deploy applications to work with previous versions of the .NET Framework. I show you how in the section Using Visual Studio 2010
with .NET 2.0, later in this chapter. You cant unconvert. You can restore your backups, however, and discard the converted application if you dont like the results.
116
You may be able to reuse stable components created in Visual Basic 6.0 by using a feature of the .NET Framework called COM Interop. With COM Interop, you can consume your Visual Basic 6 code from your .NET applications. In the case of ASP.NET, you have additional considerations when you choose to upgrade to Visual Studio 2010 and ASP.NET 4.0: ASP.NET uses a new, simplified model for managing resources, such as code and Web pages. Project files are no longer needed because all the configuration settings are moved to web.config, an XML-based configuration file. If youre really attached to using project files, you can use the Web Application Projects extension for Visual Studio 2005. Download the extension for free from Microsofts Web site at http://msdn2. microsoft.com/asp.net/aa336618.aspx. This extension still works with Visual Studio 2010. You can execute your Web sites on local development machines by using the ASP.NET Developer Server. Using the ASP.NET Developer Server requires less configuration and is more secure than using Internet Information Services (IIS) as your local Web server. ASP.NET 4.0 offers a new code-behind model, new controls for laying out Web pages and working with data, and improved deployment
options. Your productivity is greatly improved with ASP.NET 4.0. See Book III for more information on creating Web applications with ASP.NET 4.0.