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.
I have run into this issue a couple of times recently while trying to install some of the currently available Windows Media Center applications and test them out on Windows Vista. Many of the applications that are currently available were created with Update Rollup 2 for Windows XP Media Center 2005 as a target platform. That means they were often built with Visual Studio .NET 2003 and the .NET Framework 1.1 and the setup was created using the VS 2003 setup/deployment project.
The settings for the setup/deployment projects in VS 2003 include an option to add a .NET Framework launch condition. You can add this launch condition by doing the following:
When you do this, your setup package will check for the existence of the .NET Framework 1.1 and block installation if it is not present. This will likely cause confusion when users try to install this package on Windows Vista because Windows Vista already includes the .NET Framework 2.0 as part of the OS, and many users do not understand why they need to install an older version of the .NET Framework when a newer version is already present.
If you would like to avoid this confusion, you can do the following in your VS 2003 setup/deployment project to allow it to install if the .NET Framework 2.0 is present on the system (even if the .NET Framework 1.1 is not):
Note - you cannot use wildcards in the SupportedRuntimes value. It must be set as listed in step 4 above to work as expected.
It is also very important to note that if you decide to include the .NET Framework 2.0 in the list of SupportedRuntimes for your application that this implies some additional testing work on your part. You need to make sure that you test your application in scenarios where it is installed on a computer that has the .NET Framework 2.0 but not the .NET Framework 1.1. In general, this scenario should work fine, however there is a small set of functionality that will not work because a few breaking changes were made to the .NET Framework 2.0 APIs for things like security reasons.
There are some good documents on the GotDotNet site with details about .NET Framework 2.0 breaking changes that will affect backwards compatibility:
If you have code that is affected by any .NET Framework 2.0 breaking changes, you will need to enforce the .NET Framework 1.1 in your application setup and also include some config files or other means of binding your application so it will only use the .NET Framework 1.1 at runtime.
If you do not have code affected by any .NET Framework 2.0 breaking changes, and your application setup currently checks for only the .NET Framework 1.1, I highly encourage you to try adding the 2.0.50727 SupportedRuntimes value and performing some application compatibility testing on systems that only have the .NET Framework 2.0. This has the potential to offer customers a much smoother, less confusing installation scenario on Windows Vista.