.Net Migration


Published on

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.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

.Net Migration

  1. 1. Migration of .net Application Muthu Swamy S ms@deepbiz.net +91 98861 97840 October 20, 2012 .Net Migration Version and Dependencies Migration of .net Application DEEPBIZ | www.deepbiz.net | info@deepbiz.net P a g e |0
  2. 2. ScopeUpgrading your earlier version of .NET applications to .Net Framework 4.5 is easy by openingthe project in Visual Studio 2012. If your project was created in an earlier version, the ProjectCompatibility dialog box automatically opens.However, some changes in the .NET Framework require changes to your code. You may alsowant to take advantage of functionality that is new in the .NET Framework 4.5. Making thesetypes of changes to your application for a new version of the .NET Framework is typicallyreferred 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 andDependencies of .NET Framework.The purpose of this article is to explain how to check the available .NET Frameworks Versionand Dependencies in the System..NET Frameworks Version and DependenciesEach version of the .NET Framework contains the common language runtime (CLR) as its corecomponent, and includes additional components such as the base class libraries and othermanaged libraries. This article describes the key components of the .NET Framework by version,provides information about the underlying CLR versions and associated developmentenvironments, and identifies the versions that are installed by the Windows operating systemas indicated in the picture. Page 01
  3. 3. Version HistoryThe .NET Frameworkversions 2.0, 3.0, and 3.5are built with the sameversion of the CLR (CLR2.0). These versionsrepresent successive layersof a single installation. Eachversion is built incrementally on top of the earlier .NET Framework versions. It is not possibleto run versions 2.0, 3.0, and 3.5 side by side on a computer. When you install the .NETFramework 3.5 SP1, you get the 2.0 and 3.0 layers automatically. However, the .NETFramework 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 thatwere built for versions 2.0, 3.0, and 3.5 can all run on version 3.5, but they will not work onversion 4 or later.The .NET Framework 4.5 is an in-place update that replaces the .NET Framework 4 on yourcomputer. After you install this update, your .NET Framework 4 apps should continue to runwithout requiring recompilation. However, some changes in the .NET Framework may requirechanges to your app code.Features and IDE NET Introduced Description Framework with IDE version 1.0 Visual Studio Contained the first version of the CLR and the first .NET version of the base class libraries. 1.1 Visual Studio Included updates to ASP.NET and ADO.NET. This .NET 2003 version was subsequently updated twice, with Service Pack 1 (SP1) and SP2. This version also introduced Page 02
  4. 4. side-by-side execution, which enables apps on a single computer to run against multiple versions of the CLR. 2.0 Visual Studio Introduced a new version of the CLR with additions to 2005 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 This version is essentially .NET Framework 2.0 with 2005 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 Added new features such as AJAX-enabled websites 2008 and LINQ. The SP1 update added Dynamic Data, and a small set of additional enhancements. 4 Visual Studio Included a new version of the CLR, expanded base 2010 class libraries, and new features such as the Managed Extensibility Framework (MEF), dynamic language runtime (DLR), and code contracts. 4.5 Visual Studio Includes an updated version of the CLR, support for 2012 building Windows Store apps, and updates to WPF, WCF, WF, and ASP.NET..NET Framework VersionsYou can find out the version numbers in the system using registry editor [regedit.exe] from thewindows registry. The installed versions are listed under the NDP subkey atHKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPYou can test whether the .NET Framework 4.5 or the .NET Framework 4 is installed by checkingthe HKEY_LOCAL_MACHINESOFTWAREMicrosoftNET Framework SetupNDPv4Full subkeyin the registry for a DWORD value named Release. The existence of this DWORD indicates thatthe .NET Framework 4.5 has been installed on that computer. The value of Release is a versionnumber. To determine if the final release version of the .NET Framework 4.5 is installed, checkfor a value that is equal to or greater than 378389 as shown in the picture. Page 03
  5. 5. The following code programmatically determines the versions of the .NET Framework that areinstalled 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(@"SOFTWAREMicrosoftNET Framework SetupNDP")It will provide you the result as, Page 04
  6. 6. .NET Framework UpdatesYou can read the framework updates fromHKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftUpdates using the codeRegistryKey baseKey = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine,RegistryView.Registry32).OpenSubKey(@"SOFTWAREMicrosoftUpdates")Once you run the code, the output shows the available .NET Framework updates in the system as shown in thepicture. Page 05
  7. 7. Dot Net Framework Availability Checker UtilittyThe code demonstrates the .Net Frameworks Versions and their updates in the system. Youcan download the code from here:https://docs.google.com/open?id=0BxWxKlOt68qYbzBqa3dFcDVMQXM .Setup file from here : https://docs.google.com/open?id=0BxWxKlOt68qYVjl5d0dOMGtsa0E Page 06