I've asked this question yesterday - it was closed as "exact duplicate" by some people who didn't take the time themselves to read questions / comments carefully! So, another try - maybe it gets the time to receive some working answer before being closed for some pointless reason again.
Microsoft has recently released some "update" for .NET Framework. Unfortunately, I don't know any way to find out which version is installed. Framework-Version stays on 4.0.30319.239
.
Thanks for some enlightement ;-)
PS: Setting supportedRuntime in app.config to Version=4.0.2 makes the application tell me at startup that 4.0.2 is not installed (in no time - so there must be some place where the "real" version can be found).
The version of .NET Framework (4.5 and later) installed on a machine is listed in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full. If the Full subkey is missing, then .NET Framework 4.5 or above isn't installed.
Open Start. Search for Command Prompt, right-click the top result, and select the Run as administrator option. Type the following command to determine the version of . NET installed and press Enter: reg query "HKLM\SOFTWARE\Microsoft\Net Framework Setup\NDP" /s.
Have a look at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs
If you have installed 4.0.2 then there exist these additional nodes:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.1
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.1,Profile=Client
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.0.2,Profile=Client
This shouldn't make a difference. You don't target specific build numbers of the framework, you target the release number, which in this case is 4.0. What are you doing where you need to know the exact build number?
WTF - why use buildcounters?!
Why wouldn't you? It details the exact version of the framework. Typically you don't release software with a round "this is version 1.0.0.0" because it can cause havoc with versioning for updates/hotfixes etc.
Simply targeting .NET 4.0 should be sufficient.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With