46.2. Upgrading to .NET Framework v3.5

Once you have migrated your application across to Visual Studio 2008 and tidied up your build environment, you should consider the upgrade path to .NET Framework v3.5. Unlike the upgrade to version 2.0 of the .NET Framework, where there were a number of breaking changes, the upgrade to v3.5 should be relatively painless. Though there are still some changes you may need to make, for the most part your existing application should be easily upgradable. The main reason for this is that the underlying CLR has not changed, only the libraries that sit above it.

In most cases upgrading your application is just a matter of changing the Target Framework project property. Figure 46-4 shows the project properties dialog for a web site. On the Build tab there is a drop-down that lists the different target frameworks that are available for you to select. For other application types, this property may be found in the Advanced Compile Options dialog for VB.NET projects (from the Compile tab of the project properties designer) and the Application tab of the project properties designer for C# projects. However, they all essentially allow you to change the version of the .NET Framework that the project is compiled against.

Figure 46.4. Figure 46-4

One exception to this is device applications. If you go to either the Advanced Compile Options dialog (VB.NET) or the Application tab (C#) of a device application, you will note that the Target Framework drop-down is disabled, preventing you from upgrading that project. To upgrade to version 3.5 of the .NET Compact Framework, you have to right-click the project in Solution Explorer and select Upgrade Project from the shortcut menu (this is also available in the Project menu when the device project has focus in the Solution Explorer). Figure 46-5 shows the prompt you will see when you select to upgrade a device project. This is slightly different from the upgrade prompt you see when changing the target framework for other projects — this simply informs you that the project will be unloaded and reloaded so as to upgrade assembly references. The big difference is that the upgrade for a device project is not reversible, and you can't elect to target an earlier .NET Compact Framework version at a later stage.

Figure 46.5. Figure 46-5

You can, in fact, reverse this upgrade by unloading the relevant project and editing the project to change the Target Framework version.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.97.75