Elegant check for .Net Framework 1.1 or 2.0?
-
When attempting to run a 1.1 based exe on 2.0, you get an ugly TypeInitialization exception. I have yet to attempt running 2.0 on 1.1 machine. Either way, assuming the app does not have access to it's native framework, does anyone know a good way to display a user-friendly message explaining the problem?
-
When attempting to run a 1.1 based exe on 2.0, you get an ugly TypeInitialization exception. I have yet to attempt running 2.0 on 1.1 machine. Either way, assuming the app does not have access to it's native framework, does anyone know a good way to display a user-friendly message explaining the problem?
If it's possible, you're probably better off checking for the framework before the application is installed, and letting the user install it before proceeding further. That's what we do and it works pretty good since our installer is not .NET based. I suspect you are in the same situation. Innosetup[^] is a great free installation tool. Carl Mercier Geek entrepreneurs, visit my blog! [^]
-
When attempting to run a 1.1 based exe on 2.0, you get an ugly TypeInitialization exception. I have yet to attempt running 2.0 on 1.1 machine. Either way, assuming the app does not have access to it's native framework, does anyone know a good way to display a user-friendly message explaining the problem?
Tom Ollar wrote:
When attempting to run a 1.1 based exe on 2.0, you get an ugly TypeInitialization exception.
I have not seen this problem. Did you apply the .NET 2.0 element stuff in the App.config file? I have ran my rather complex application without issues on both runtime, binary serialization is even forwards and backwards compatible :) xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
-
If it's possible, you're probably better off checking for the framework before the application is installed, and letting the user install it before proceeding further. That's what we do and it works pretty good since our installer is not .NET based. I suspect you are in the same situation. Innosetup[^] is a great free installation tool. Carl Mercier Geek entrepreneurs, visit my blog! [^]
-
Tom Ollar wrote:
When attempting to run a 1.1 based exe on 2.0, you get an ugly TypeInitialization exception.
I have not seen this problem. Did you apply the .NET 2.0 element stuff in the App.config file? I have ran my rather complex application without issues on both runtime, binary serialization is even forwards and backwards compatible :) xacc-ide 0.0.99-preview7 now with C#, C, C++, IL, XML, Nemerle, IronPython, Perl, Caml, SML, Ruby, Flex, Yacc, Java, Javascript, Lua, Prolog and Boo highlighting support!
The app is the MiniWalker. The current version was compiled with VS 2003 and it only runs with the 1.1 Framework. On a machine with only the 2.0 Framework installed, it crashes with the Type Initialization error. Microsoft says this is correct here. So it looks like a real setup program is the only answer... -- modified at 10:20 Saturday 5th November, 2005