Select the product you need help with
How to detect the installed version of the .NET Framework in a Visual Studio Setup and Deployment packageArticle ID: 315291 - View products that this article applies to. This article was previously published under Q315291 On This PageINTRODUCTIONThis step-by-step article describes how to use the Microsoft Visual Studio .NET IDE to verify the version of the .NET Framework that is installed on a client computer for software installation purposes.
Note This article does not show you how to programmatically detect the .NET Framework in a managed application. The scenario that is covered in this article is a deployment scenario where a developer is not sure of the version of the .NET Framework that is installed on the client computer. This article also does not show you how to detect if a service pack is installed in the .NET Framework. MORE INFORMATIONRequired knowledgeThis article assumes that you are familiar with the following topic:Visual Studio .NET deployment and setup projects Detect the current installed versionTo add a launch condition in the deployment project against the .NET Framework version registry key, follow these steps:
Locate the following key for the .NET Framework 1.0: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.0
Rename the previous key to the following:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\XXXv1.0
Locate the following key for the .NET Framework 1.1:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v1.1
Rename the previous key to the following:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\XXXv1.1 Locate the following key for the .NET Framework 2.0:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v2.0
Rename the previous key to the following: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\XXXv2.0 Do not forget to rename the key after you complete your test. REFERENCES
For additional information, visit the following Microsoft Developer Network (MSDN) Web sites: Creating or adding deployment projects http://msdn.microsoft.com/en-us/library/aa291133.aspx
(http://msdn.microsoft.com/en-us/library/aa291133.aspx)
Adding items to a deployment project http://msdn.microsoft.com/en-us/library/aa291131.aspx
(http://msdn.microsoft.com/en-us/library/aa291131.aspx)
Properties for the Launch Conditions Editor http://msdn.microsoft.com/en-us/library/aa291900.aspx
(http://msdn.microsoft.com/en-us/library/aa291900.aspx)
Adding a launch condition in the Launch Conditions Editor http://msdn.microsoft.com/en-us/library/aa301646.aspx
(http://msdn.microsoft.com/en-us/library/aa301646.aspx)
PropertiesArticle ID: 315291 - Last Review: December 3, 2007 - Revision: 6.6 APPLIES TO
| Article Translations
|


Back to the top








