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.
Microsoft has posted an updated knowledge base article today with a unified list of install state and service pack level detection information for each of the currently released versions of the .NET Framework (1.0, 1.1, 2.0, 3.0, 3.5 and 4). You can find the knowledge base article at http://support.microsoft.com/kb/318785 and I encourage you to take a look if you have any scenarios where you need to detect .NET Framework install state information.
Also, as a reminder, I have posted some sample code that demonstrates how to implement .NET Framework detection logic, and this type of example might be useful if you need to be able to detect the .NET Framework install state in your installer or your application code.
Is there sample code for this in C#? I've seen a few attempts thrown together, but is there something more "official"? Thanks!
Hi Adamqkaen - I have only written sample code in C++ because this type of detection typically happens during a setup process and is used to decide whether or not to chain the .NET Framework setup with the application setup. If the detection code is in C#, then at least one version of the .NET Framework has to already be installed on the computer or it will fail to run.
It should be pretty straightforward to convert the C++ sample code to C# though. Please let me know if you run into any issues if you end up trying to do that.
@adamqkaen, looks like Scott Dorman has the C# equivalent that you are looking for:
Hi I have problem while im installing netframework 4.0 and 3.5....it says while im installing it just stops and pop up new window.and says Don't Send Button..i know you that button..so how can i fix it.Only Netframework 2.0 i have installed.
Hi Mark - Can you please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, upload the file named %temp%\vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and post a link that I can use to download your log files and take a closer look?