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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top