Why do my programs sometimes work on machines with no .Net installed on them?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ashwah
    New Member
    • Aug 2007
    • 15

    Why do my programs sometimes work on machines with no .Net installed on them?

    Hi All,

    I'm using Visual Studio 2005 to make various tool for my work. The standard PCs around the office do not have .NET installed on them. Sometimes if I attempt to run my programs on them they work fine and other programs don't as a result of the missing .NET components. Can somebody explain what it is that determines whether they will run without .NET or not.

    More specifically, I've made something which uses ADO to shift some data into an Access Database. I get the following error on the machine lacking .NET:

    could not load file or assembly 'Interop.ADOBD, Version=2.8.0.0 , Culture=neutral , PublicKeyToken= null' or one of its dependencies. The system cannot find the file specified.

    Is there any way I can make what I have work on these machines without installing .NET?

    Would really appreciate any pointers on this issue.

    Ash
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Are you sure that they don't just have .NET1.1 but not .NET2.0?

    Comment

    • TRScheel
      Recognized Expert Contributor
      • Apr 2007
      • 638

      #3
      A program written in .NET will only run on a machine that has .NET installed on it.

      I'd hate to go through the specifics again (they are on this forum) but basically earlier programs compiled into machine language, where as .NET programs compile into pseudo machine language. Its unreadable by your CPU so it would be unable to run on any machine without the Just In Time (JIT) compiler installed on it (which comes with .NET because it needs those libraries to work).

      Long story short, those computers which you think dont have .NET installed on them, really do. Maybe version 1.1. And no, without installing .NET those programs will not work.

      Comment

      • ashwah
        New Member
        • Aug 2007
        • 15

        #4
        Originally posted by TRScheel
        A program written in .NET will only run on a machine that has .NET installed on it.

        I'd hate to go through the specifics again (they are on this forum) but basically earlier programs compiled into machine language, where as .NET programs compile into pseudo machine language. Its unreadable by your CPU so it would be unable to run on any machine without the Just In Time (JIT) compiler installed on it (which comes with .NET because it needs those libraries to work).

        Long story short, those computers which you think dont have .NET installed on them, really do. Maybe version 1.1. And no, without installing .NET those programs will not work.
        OK thanks. I still don't understand tho. Taking the program with ADO as an example, before I added the ADO stuff it worked ok on the PCs w/o .NET. It's only today that they ceased to work. Does this mean they DO have .NET? Theres no 'C:\Program Files\Microsoft .NET' folder on those machines but I guess theres a better way to tell, is there?

        Comment

        • Plater
          Recognized Expert Expert
          • Apr 2007
          • 7872

          #5
          If you check the installed software you will see .NET framework1.x is installed.

          The 'C:\Program Files\Microsoft .NET' for me only contains ADO drivers and less then a dozen other dlls, probably part of some special part of .net2.0.
          You could either find a way to distribute those ADO directories correctly, force a .net2.0 upgrade, or find a way to compile your programs using only the .net1.x libraries.

          Originally posted by ashwah
          OK thanks. I still don't understand tho. Taking the program with ADO as an example, before I added the ADO stuff it worked ok on the PCs w/o .NET. It's only today that they ceased to work. Does this mean they DO have .NET? Theres no 'C:\Program Files\Microsoft .NET' folder on those machines but I guess theres a better way to tell, is there?

          Comment

          • ashwah
            New Member
            • Aug 2007
            • 15

            #6
            Oh I figured it out now. I was being an idiot.

            Thanks for your help...

            Comment

            • kenobewan
              Recognized Expert Specialist
              • Dec 2006
              • 4871

              #7
              At least you were clever enough to ask the question :).

              Comment

              Working...