0

A .NET 4.0 application needs to run without errors after system upgrade from Windows XP to Windows Vista.

When application is installed in XP, the shortcut is added to startup folder so it starts with the system. After system upgrade, on first system start, application crashes with .NET Initialization Error. It's because .NET Framework just begins to upgrade on first system start. When .NET upgrade finishes, application runs correctly.

The question is: can you see some clever workaround for this problem? Application doesn't have to start on first boot after upgrade, but it must not display an .NET Initialization error.

Paweł Bulwan
  • 8,467
  • 5
  • 39
  • 50
  • 1
    Feature, not a bug: http://stackoverflow.com/questions/10032233/why-does-my-net-4-application-know-net-4-is-not-installed/10033128#10033128 – Hans Passant Jun 15 '12 at 13:15

1 Answers1

0

Clever work around? You could have a native launcher app that detects if .net is the correct version and if it then it starts your .net application. You could simply check the registry as in this question.

Community
  • 1
  • 1
msanders
  • 497
  • 2
  • 8
  • I was hoping that native launcher can be avoided for such a rare case, but thanks for an answer! – Paweł Bulwan Jun 15 '12 at 13:16
  • Yeah, its a rubbish answer really. Maybe it is better just to leave .Net moan to the user about not being installed and let them sort it out, especially in such a rare edge case. – msanders Jun 15 '12 at 13:26
  • It's been reported as a bug in my project so I need to try, but also think it's not worth the attention ;) – Paweł Bulwan Jun 15 '12 at 13:38