3
votes

We have a custom action in our installer. We upgraded our projects to the .NET 4.0 framework, and when it applies the custom action, the installer throws a 1001 error that says the version of the framework is invalid.

The custom action uses the value from a radio-button window earlier in the installer (i.e. takes CustomActionData). In my project containing the main exe, I have class that inherits from Installer, has the attribute [RunInstaller(true)] set, and overrides the Install function.

The installer works just fine compiled in VS 2010 for .NET 3.5. I'm running Windows 7 64-bit.

Is there any way we can upgrade our installer/custom action to work with .NET 4.0?

1
If you need custom actions, consider moving to a more robust install technology such as WiX (free, no real IDE) or InstallShield (expensive, full IDE). Making those Installer derived CAs work correctly under all scenarios is just plain hard to both write and test. It's just too easy to run in the wrong sequence of your installer. (If you don't know what I mean, here's a good starting point: blogs.technet.com/alexshev/archive/2008/02/21/… ; if you don't know all that stuff, you shouldn't be writing CAs.) Good luck!Mike Post

1 Answers

0
votes

You need to have minimum of .Net Framework 4.0 client profile installed.

As your other projects are on 4.0 framework you should move the installer to 4.0 too.

Download .Net Framework 4.0 Client profile