Migration Guide to the .NET Framework 4
If you created your application using an earlier version of the .NET Framework, you can generally upgrade it to version 4 easily. Open your project in Visual Studio 2010. If your project was created in an earlier version, the Visual Studio Conversion Wizard automatically opens. For more information about upgrading a project, see How to: Upgrade Projects Created in Earlier Versions of Visual Studio.
However, some changes in the .NET Framework require changes to your code. You may also want to take advantage of functionality that is new in the .NET Framework 4. Making these types of changes to your application for a new version of the .NET Framework is typically referred to as migration. If your application does not have to be migrated, you can run it in the .NET Framework 4 without recompiling; for more information, see How to: Configure the .NET Framework 4 Runtime. For compatibility testing scenarios, see .NET Framework 4 Application Compatibility Walkthrough.
This topic describes tasks, resources, and issues related to migrating applications from the .NET Framework 3.5 to the .NET Framework 4.
Migration Resources
Review the following documents before you migrate your application:
Review the next section in this topic ("Migration Issues Overview") to determine the technologies that may cause migration issues for your application. For details and recommended changes, see .NET Framework 4 Migration Issues.
Review What's Obsolete in the .NET Framework to determine any types or members in your code that have been made obsolete, and the recommended alternatives.
See What's New in the .NET Framework 4 for descriptions of new features that you may want to add to your application.
Review New Types and Members in the .NET Framework 4 for lists of new types and members that could be advantageous to include in your application.
Learn about new features by using the Visual Studio 2010 and .NET Framework 4 Walkthroughs.
If you are migrating an Office project, review Migrating Office Solutions to the .NET Framework 4.
Migration Issues Overview
The following table provides a summary of the key issues described in detail in .NET Framework 4 Migration Issues. These include fixes that have been made to resolve earlier issues as well as improvements that could help in your migration tasks.
Technology |
Application development and resources |
Configurations and other considerations |
Controls and graphics |
Security |
Interoperability |
Pertinent types and members |
---|---|---|---|---|---|---|
ASP.NET and Web |
Support for child Web applications of different versions. |
|
|
|
None. |
HttpBrowserCapabilities, HttpUtility, HttpServerUtility, Menu, MenuRenderingMode, ControlRenderingCompatibilityVersion, PopOutImageUrl, StaticPopOutImageUrl, DynamicPopOutImageUrl, AppendHeader(String, String), PassportIdentity, HttpRequest, FilePath, AppRelativeCurrentExecutionFilePath, CurrentExecutionFilePath, PathInfo |
Core |
|
|
None. |
|
|
Date and time: Local, Now, TimeSpan Globalization: CurrencyEnglishName, LongDatePattern, PMDesignator, CultureTypes, FrameworkCultures, WindowsOnlyCultures Exceptions: HandleProcessCorruptedStateExceptionsAttribute, ExecutionEngineException Reflection: HashAlgorithm, None, GetReferencedAssemblies(), ProcessModuleCollection, DeclaringType |
Data |
Hosting improvements. |
|
None. |
None. |
None. |
DataSet and SQL Client: IRelatedEnd, IEntityWithRelationships, DataView, PropertyChanged, RejectChanges(), DataSet, Prepare() Entity Framework: Detach(Object), SaveChanges() LINQ to SQL: EntitySet<TEntity>, ListChanged WCF Data Services: TimeoutException, DataServiceRequestException, MergeOption, AppendOnly, PreserveChanges, OnStartProcessingRequest(ProcessRequestArgs), ServiceOperation |
Globalization |
Culture information obtained from operating system, starting with Windows 7. |
|
None. |
None. |
None. |
None. |
WCF |
None |
|
None. |
None. |
None. |
None. |
WPF |
|
|
|
|
None. |
Applications: AllowsTransparency, WindowState Controls: CollectionView, SetCurrentValue(DependencyProperty, Object), Copy(), Cut() Graphics: DropShadowEffect, BlurEffect, ShaderEffect, DownloadFailed, InputBinding, DeadCharProcessed, DeadCharProcessedKey UI Automation: TreeViewAutomationPeer, TreeViewItemAutomationPeer, IItemContainerProvider, ISynchronizedInputProvider, IVirtualizedItemProvider |
XML |
None. |
|
None. |
None. |
None. |
Schema and transforms: XmlReader, CreateReader(), XPathNavigator, XmlSchemaSet, Load(XmlReader) Validation: ReadContentAs(Type, IXmlNamespaceResolver), IXmlNamespaceResolver, Create(Stream) Writing: WriteEntityRef(String), XmlWriter, None |
See Also
Tasks
How to: Configure the .NET Framework 4 Runtime
Reference
New Types and Members in the .NET Framework 4
Concepts
.NET Framework 4 Migration Issues
Migrating from the .NET Framework Version 1.1
Version Compatibility in the .NET Framework
What's New in the .NET Framework 4
.NET Framework Versions and Dependencies
Other Resources
What's Obsolete in the .NET Framework