Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Elegant check for .Net Framework 1.1 or 2.0?

Elegant check for .Net Framework 1.1 or 2.0?

Scheduled Pinned Locked Moved C#
csharpc++dotnethelpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Tom Ollar
    wrote on last edited by
    #1

    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?

    L L 2 Replies Last reply
    0
    • T Tom Ollar

      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?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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! [^]

      T 1 Reply Last reply
      0
      • T Tom Ollar

        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?

        L Offline
        L Offline
        leppie
        wrote on last edited by
        #3

        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!

        T 1 Reply Last reply
        0
        • L Lost User

          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! [^]

          T Offline
          T Offline
          Tom Ollar
          wrote on last edited by
          #4

          Thanks Carl, I'll check it out...

          1 Reply Last reply
          0
          • L leppie

            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!

            T Offline
            T Offline
            Tom Ollar
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups