The code:
Console.WriteLine(Environment.Version);
returns identical results (2.0.50727.5448) for .NET Framework 2.0, 3.0, and 3.5 SP1. How do I learn the exact version of the installed .NET platform?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You need to read registry keys to detect versions at service pack granularity. This article explains what key/value pairs you need to look for.
For example, you can tell
3.5from3.5 SP1by looking at values inside“plain” 3.5 has
Install = 1, whileSP1hasSP >=1.Scroll to the bottom of the article at the link to see the entire table.