Upload
mait
View
539
Download
5
Embed Size (px)
DESCRIPTION
The purpose of this article is to explain how to check the available .NET Frameworks Version and Dependencies in the System during the migration of legacy applications.
Citation preview
Migration of .net Application Muthu Swamy S
+91 98861 97840
P a g e | 0
October 20, 2012
.Net Migration Version and Dependencies
Migration of .net Application DEEPBIZ | www.deepbiz.net | [email protected]
Page 01
Scope
Upgrading your earlier version of .NET applications to .Net Framework 4.5 is easy by opening the project in Visual Studio 2012. If your project was created in an earlier version, the Project Compatibility dialog box automatically opens.
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.5. 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.5 without recompiling it.
You have to consider Application Compatibility and Version Compatibility during the migration. Before start doing the migration you have to ensure the environment readiness for Version and Dependencies of .NET Framework.
The purpose of this article is to explain how to check the available .NET Frameworks Version and Dependencies in the System.
.NET Frameworks Version and Dependencies
Each version of the .NET Framework contains the common language runtime (CLR) as its core component, and includes additional components such as the base class libraries and other managed libraries. This article describes the key components of the .NET Framework by version, provides information about the underlying CLR versions and associated development environments, and identifies the versions that are installed by the Windows operating system as indicated in the picture.
Page 02
Version History
The .NET Framework versions 2.0, 3.0, and 3.5 are built with the same version of the CLR (CLR 2.0). These versions represent successive layers of a single installation. Each version is built incrementally on top of the earlier .NET Framework versions. It is not possible to run versions 2.0, 3.0, and 3.5 side by side on a computer. When you install the .NET Framework 3.5 SP1, you get the 2.0 and 3.0 layers automatically. However, the .NET Framework 4 ends this layering approach. Starting with the .NET Framework 4, you can use in-process side-by-side hosting to run multiple versions of the CLR in a single process. Apps that were built for versions 2.0, 3.0, and 3.5 can all run on version 3.5, but they will not work on version 4 or later.
The .NET Framework 4.5 is an in-place update that replaces the .NET Framework 4 on your computer. After you install this update, your .NET Framework 4 apps should continue to run without requiring recompilation. However, some changes in the .NET Framework may require changes to your app code.
Features and IDE
NET Framework
version
Introduced with IDE
Description
1.0 Visual Studio .NET
Contained the first version of the CLR and the first version of the base class libraries.
1.1 Visual Studio .NET 2003
Included updates to ASP.NET and ADO.NET. This version was subsequently updated twice, with Service Pack 1 (SP1) and SP2. This version also introduced
Page 03
side-by-side execution, which enables apps on a single computer to run against multiple versions of the CLR.
2.0 Visual Studio 2005
Introduced a new version of the CLR with additions to the base class libraries, including generics, generic collections, and significant additions to ASP.NET. This version was updated with SP1 and SP2.
3.0 Visual Studio 2005
This version is essentially .NET Framework 2.0 with the addition of Windows Presentation Foundation (WPF), Windows Communications Foundation (WCF), Windows Workflow Foundation (WF), and CardSpace. It was updated with SP1 and SP2.
3.5 Visual Studio 2008
Added new features such as AJAX-enabled websites and LINQ. The SP1 update added Dynamic Data, and a small set of additional enhancements.
4 Visual Studio 2010
Included a new version of the CLR, expanded base class libraries, and new features such as the Managed Extensibility Framework (MEF), dynamic language runtime (DLR), and code contracts.
4.5 Visual Studio 2012
Includes an updated version of the CLR, support for building Windows Store apps, and updates to WPF, WCF, WF, and ASP.NET.
.NET Framework Versions
You can find out the version numbers in the system using registry editor [regedit.exe] from the windows registry. The installed versions are listed under the NDP subkey at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP
You can test whether the .NET Framework 4.5 or the .NET Framework 4 is installed by checking the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full subkey in the registry for a DWORD value named Release. The existence of this DWORD indicates that the .NET Framework 4.5 has been installed on that computer. The value of Release is a version number. To determine if the final release version of the .NET Framework 4.5 is installed, check for a value that is equal to or greater than 378389 as shown in the picture.
Page 04
The following code programmatically determines the versions of the .NET Framework that are installed on a computer. You must have administrative credentials to run this example. [Download Code here]
Read the Registry key from Microsoft.Win32 API using RegistryKey as shown here.
RegistryKey ndpKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP\")
It will provide you the result as,
Page 05
.NET Framework Updates
You can read the framework updates from HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Updates using the code
RegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine,
RegistryView.Registry32).OpenSubKey(@"SOFTWARE\Microsoft\Updates")
Once you run the code, the output shows the available .NET Framework updates in the system as shown in the
picture.
Page 06
Dot Net Framework Availability Checker Utilitty
The code demonstrates the .Net Frameworks Versions and their updates in the system. You can download the code from here: https://docs.google.com/open?id=0BxWxKlOt68qYbzBqa3dFcDVMQXM .
Setup file from here : https://docs.google.com/open?id=0BxWxKlOt68qYVjl5d0dOMGtsa0E