AFAIK Windows 8 is come with .NET Framework 4.5 and does not include 2.0 version. I had an application targeted version 2.0 and now if i run it in windows 8 it says something like "You need to install .net framework 2.0". As far as i read from msdn all .net versions has backward compatibility and you need to state supported framework versions in app.config file if you want your app to run on a newer version. I prepared the config file below and now i am able to run msi but, while executing custom actions msiexec is failing and giving the following error "Error 1001. InstallUtilLib.dll:CoreBindToRuntimeHost (hr=0x80070003): The system can not find the path specified". How can i resolve this error? My guess is that it is looking for the InstallUtilLib under .net framework 2.0 folder.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" />
<supportedRuntime version="v3.5" />
<supportedRuntime version="v3.0" />
<supportedRuntime version="v2.0.50727" />
</startup>
</configuration>
InstallUtil had many flaws and limitations. You'll notice that if you run your installer silently (/qn) that you still get a modal 1001 error message. Yes, that's wrong. Yes, it's that broken.
Take a look at refactoring your code using Windows Installer XML (WiX) Deployment Tools Foundation (DTF) custom actions. It's an open source project from Microsoft and it solves these problems including a great many that you are probably not aware of.
Deployment Tools Foundation (DTF) Managed Custom Actions
In Visual Studio you use File | New Project | Windows Installer XML | C# Custom Action to create your project. Go into Project Properties and set the .NET version to 2.0. Remove the 4.0 references. Take a look at the CustomAction.Config and notice it's set up to support 2.0, 4.0 and beyond. Then port your code over. Build the project and take the CustomActionName.CA.dll and add it to your installer as a DLL custom action.
Also realize that if you are using Visual Studio Deployment Projects that they have a number of problems also and that Microsoft removed that project type from Visual Studio 2012.