2

I have a WPF application with when new user execute it on there machine they will get this ugly error message :

To run this application, you first must install on of the following versions of the .NET Framework: v4.0.30319

I need to customize this message to a better GUI and maybe in different languages, how could I do that ?

Ehsan Zargar Ershadi
  • 24,115
  • 17
  • 65
  • 95

1 Answers1

3

The only way to 'customize' that dialog is going to be to build a native (non .NET) wrapper or stub for your application which checks whether the .NET framework is installed. You can do this via the registry (support.microsoft.com/kb/315291), and display a message if not.

You could do all this, or take the common sense approach of automatically installing the framework when necessary via bundling or direct download as Mark Hall commented.

Update describing simple wrapper process

  1. Rename your current project from MyFile.exe to MyFileInner.exe
  2. Create new native application, call it MyFile.exe In new native application, check registry as per linked MS article. You will need different keys for .NET v4
  3. If .net requirement not satisfied, your display your custom 'not installed' message(s), then exit
  4. If .net requirement IS satisfied, start MyFileInner.exe
geoffreys
  • 1,107
  • 7
  • 24