Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
i know that this code do that

"
C#
SOFTWARE\Microsoft\NET Framework Setup\NDP"


but i can't find "NDP"

i'm sure i installed dot net on my pc
Posted
Comments
Kornfeld Eliyahu Peter 9-Jun-15 7:56am    
Are you looking for that NDP under current user or local machine?
Golden Basim 9-Jun-15 17:38pm    
local machine
Kornfeld Eliyahu Peter 10-Jun-15 2:24am    
And no NDP? Something went wrong there...
Are you able to reference framework 4.0 from a Visual Studio project?
Golden Basim 10-Jun-15 3:07am    
yes

Please refer below link for c# code to determine which versions of the .NET Framework are installed on a system

https://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx[^]

http://geekswithblogs.net/lorint/archive/2006/01/30/67654.aspx[^]
 
Share this answer
 
Comments
Golden Basim 9-Jun-15 17:49pm    
the result : NET FRAMEWORK ( 2,0,50727,0).

but by check it manually i founded onther version with value ( 4,0,30319,0).
how i can ask if net framework is 4.0 or above direct ?
 
Share this answer
 
Comments
Golden Basim 9-Jun-15 8:19am    
i need c# code
Kornfeld Eliyahu Peter 10-Jun-15 2:23am    
Your tip is a bit outdated... :-(
For version 4 it shows .NET4.0 (no CLR) and 4.5 and onwards not shows at all...
i founded the answer

C#
Console.WriteLine(".Net Framework Version {0}",
      Environment.Version.ToString());
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900