Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS
with no warranties, and confer no rights. Additionally, views expressed
herein are my own and not those of my employer, Microsoft.
Last week, I posted an updated version of the .NET Framework setup verification tool that supports verifying the .NET Framework 4.5.1. This past weekend, a customer reported a problem where the tool wasn’t correctly detecting that the .NET Framework 4.5.1 is installed on Windows 8.1. The .NET Framework 4.5.1 is installed as a part of the OS on Windows 8.1, and it isn’t possible to uninstall it, so there had to be something wrong with the detection logic in the tool.
After some investigation, I discovered a problem with the detection logic that is documented in the .NET Framework 4.5.1 Deployment Guide for Developers. The deployment guide says that an application can test whether the .NET Framework 4.5 or later is installed by checking the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full folder in the registry for a DWORD value named Release. A value of 378758 means that the .NET Framework 4.5.1 is installed. This logic works correctly for the redistributable version of the .NET Framework 4.5.1. However, on Windows 8.1, the Release value is set to 378675 instead, so this logic doesn’t work on Windows 8.1.
I have updated all of the following tools and samples to correctly detect the .NET Framework 4.5.1 in both the redistributable case and the Windows 8.1 OS install case:
The tool didnt work for me removing 4.5.1 from windows 8.1
Hi Phillip - On Windows 8.1, the .NET Framework 4.5.1 is installed as a part of Windows and you are not allowed to uninstall it. The cleanup tool does not allow you to attempt to remove versions of the .NET Framework that are installed as a part of Windows.
Oh okay. Thanks for the reply
Is there any way to set my V4.5.1 back to V4.0 Full ?
Hi Thomas - In order to revert from the .NET Framework 4.5 or 4.5.1 back to v4, you need to fully uninstall 4.5 or 4.5.1 and then re-install v4.
One note too - you cannot revert to v4 on Windows 8 or Windows 8.1. Windows 8 comes with the .NET Framework 4.5 installed as a part of the OS and it cannot be uninstalled, and Windows 8.1 comes with the .NET Framework 4.5.1 installed as a part of the OS and it cannot be uninstalled.
Just how does this tool works on .Net Framework detection?
I'm using Windows 8.1 SL now (which mean it comes up with .Net Framework 4.5.1 pre-installed on it?)
but when I'm using NePA 4.2, the program said that I don't have any .Net FW v4 (that those program needed to run properly)
How can I fix this?
Hi Yudhi - The tool uses registry keys documented in the .NET Framework deployment guides to determine whether or not each version of the .NET Framework is installed. You can look at the exact logic by downloading the sample code described at blogs.msdn.com/.../9763379.aspx.
If you have an application that doesn't correctly detect the .NET Framework install state, you'll need to contact the manufacturer of the application to see if they have any known issues, workarounds or patches available to fix that issue.
thanks for the reply..
but I don't have any VC++ installed on my laptop, how can I compile the script and create executable files?
would you mind to create the executable file instead of cpp file? (if possible)
Hi Yudhi - You don't need to compile the sample code. I sent you the link to that sample code so you could see the exact logic used by the verification tool to decide whether or not the .NET Framework is installed. Running the verification tool and looking at the log file that it creates will tell you what versions of the .NET Framework that it detects on your computer.
Thanks for your answer! But I indeed use W 8.1, so I guess I just have to wait for the program I want to use to update. Too bad it's not possible to downgrade.
Hi Thomas - In that case, I'd suggest contacting the manufacturer of the program that you want to use to see if they have any patches or workarounds that allow their program to run correctly on Windows 8.1.
Hi Aaron i have win 8.1, in visual studio when opening sln targeting 4.5 framework i am getting error that i don't have installed 4.5 framework.... but when i tried to install it i get "it's already installed".
.NET Framework cleanup tool - not working in 8.1
.NET Framework setup verification tool - and here is every net framework version succesfuly checked from v. 2 to 4.5 and 4.5.1
Hi Martin - When you see an error in Visual Studio about a version of the .NET Framework not being installed, it is referring to the .NET Framework multi-targeting pack that is used by the Visual Studio build process, not the .NET Framework itself. What exact version(s) of Visual Studio do you have installed on your computer? Also, what exact version(s) of the Microsoft .NET Framework Multi-Targeting Pack do you have installed on your computer?
The .NET Framework cleanup tool is supported and should work fine on Windows 8.1. Can you please provide more information about what you mean when you say it is not working in 8.1?
hi, multi-targeting pack solved my problem.. thanks
for cleanup tool:
i run it 3 times (3 time restart) and all versions of netframeworks were still there.
(now i understand that i didn't need to do it)
at the top you said that 4.5.1 is part of os installation and can't be uninstalled.
a) do you mean that only 4.5.1 can't be uninstalled and cleanup tool should still work for others version
b) or that all versions cant be uninstalled and that cleanup tool work differently than un.. and cup tool should still work.
Hi Martin - I'm glad to hear that installing the appropriate multi-targeting pack(s) resolved this issue on your computer.
Regarding the cleanup tool - it doesn't allow you to remove any versions of the .NET Framework that are installed as a part of the OS. On Windows 8.1, the .NET Framework 2.0, 3.0, 3.5 and 4.5.1 are installed as a part of the OS (although 2.0, 3.0 and 3.5 are off by default). Also, the .NET Framework 4.5.1 is a full replacement for the .NET Framework 4 and 4.5, so those versions are treated as a family by the cleanup tool.
As a result, the cleanup tool will only allow you to remove the .NET Framework 1.0 and 1.1 on Windows 8.1.