System.Management

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eric

    #1

    System.Management

    I'm writing a program in C# and found a couple of threads about how to
    check the status of a printer before sending it any data, to ensure
    that the printer is ready to print. They say to include the
    System.Manageme nt namespace. This is where my problem is, I have no
    System.Manageme nt namespace. Could anyone help me locate it or a
    reference to locate it?

  • Terry

    #2
    RE: System.Manageme nt

    If you have .Net 2.0 then it is in
    c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.

    "eric" wrote:
    [color=blue]
    > I'm writing a program in C# and found a couple of threads about how to
    > check the status of a printer before sending it any data, to ensure
    > that the printer is ready to print. They say to include the
    > System.Manageme nt namespace. This is where my problem is, I have no
    > System.Manageme nt namespace. Could anyone help me locate it or a
    > reference to locate it?
    >
    >[/color]

    Comment

    • Peter Bromberg [C# MVP]

      #3
      RE: System.Manageme nt

      Actually I think that should be:

      C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll


      Co-founder, Eggheadcafe.com developer portal:

      UnBlog:





      "Terry" wrote:
      [color=blue]
      > If you have .Net 2.0 then it is in
      > c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
      >
      > "eric" wrote:
      >[color=green]
      > > I'm writing a program in C# and found a couple of threads about how to
      > > check the status of a printer before sending it any data, to ensure
      > > that the printer is ready to print. They say to include the
      > > System.Manageme nt namespace. This is where my problem is, I have no
      > > System.Manageme nt namespace. Could anyone help me locate it or a
      > > reference to locate it?
      > >
      > >[/color][/color]

      Comment

      • Fady Anwar

        #4
        RE: System.Manageme nt

        hi i've the same problem
        when i type
        using System.Manageme nt;
        and compile the VS gives me an error indicating that there is no namespace
        named System.Manageme nt
        i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
        1.1 and 2.0
        i was trying to make a windows based application using this namespace to
        fingerprint machines to protect my software from piracy
        here is a link fot that code
        http://www.vbforums.com/showthread.php?t=250436&page=1
        the funny thing that System.Manageme nt is documented on VS 2003 but still
        the VS 2003 IDE doesn't recognize it as a valid namespace
        it's also documented here
        http://msdn.microsoft.com/library/de...management.asp
        please help i really need a fast answer for this problem
        thanx in advance
        "Peter Bromberg [C# MVP]" wrote:
        [color=blue]
        > Actually I think that should be:
        >
        > C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
        >
        >
        > Co-founder, Eggheadcafe.com developer portal:
        > http://www.eggheadcafe.com
        > UnBlog:
        > http://petesbloggerama.blogspot.com
        >
        >
        >
        >
        > "Terry" wrote:
        >[color=green]
        > > If you have .Net 2.0 then it is in
        > > c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
        > >
        > > "eric" wrote:
        > >[color=darkred]
        > > > I'm writing a program in C# and found a couple of threads about how to
        > > > check the status of a printer before sending it any data, to ensure
        > > > that the printer is ready to print. They say to include the
        > > > System.Manageme nt namespace. This is where my problem is, I have no
        > > > System.Manageme nt namespace. Could anyone help me locate it or a
        > > > reference to locate it?
        > > >
        > > >[/color][/color][/color]

        Comment

        • Fady Anwar

          #5
          RE: System.Manageme nt

          one more thing
          i've reinstalled the framework and tried that on 2 machine with both VS 2003
          and VS 2005 and still the problem is the same
          "Fady Anwar" wrote:
          [color=blue]
          > hi i've the same problem
          > when i type
          > using System.Manageme nt;
          > and compile the VS gives me an error indicating that there is no namespace
          > named System.Manageme nt
          > i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
          > 1.1 and 2.0
          > i was trying to make a windows based application using this namespace to
          > fingerprint machines to protect my software from piracy
          > here is a link fot that code
          > http://www.vbforums.com/showthread.php?t=250436&page=1
          > the funny thing that System.Manageme nt is documented on VS 2003 but still
          > the VS 2003 IDE doesn't recognize it as a valid namespace
          > it's also documented here
          > http://msdn.microsoft.com/library/de...management.asp
          > please help i really need a fast answer for this problem
          > thanx in advance
          > "Peter Bromberg [C# MVP]" wrote:
          >[color=green]
          > > Actually I think that should be:
          > >
          > > C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
          > >
          > >
          > > Co-founder, Eggheadcafe.com developer portal:
          > > http://www.eggheadcafe.com
          > > UnBlog:
          > > http://petesbloggerama.blogspot.com
          > >
          > >
          > >
          > >
          > > "Terry" wrote:
          > >[color=darkred]
          > > > If you have .Net 2.0 then it is in
          > > > c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
          > > >
          > > > "eric" wrote:
          > > >
          > > > > I'm writing a program in C# and found a couple of threads about how to
          > > > > check the status of a printer before sending it any data, to ensure
          > > > > that the printer is ready to print. They say to include the
          > > > > System.Manageme nt namespace. This is where my problem is, I have no
          > > > > System.Manageme nt namespace. Could anyone help me locate it or a
          > > > > reference to locate it?
          > > > >
          > > > >[/color][/color][/color]

          Comment

          • Peter Bromberg [C# MVP]

            #6
            RE: System.Manageme nt

            Fady,
            You have to set a hard reference in the project to the actual
            System.Managmen t.dll assembly, its not standard in machine.config.

            Hope that helps!

            Peter

            --
            Co-founder, Eggheadcafe.com developer portal:

            UnBlog:





            "Fady Anwar" wrote:
            [color=blue]
            > hi i've the same problem
            > when i type
            > using System.Manageme nt;
            > and compile the VS gives me an error indicating that there is no namespace
            > named System.Manageme nt
            > i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
            > 1.1 and 2.0
            > i was trying to make a windows based application using this namespace to
            > fingerprint machines to protect my software from piracy
            > here is a link fot that code
            > http://www.vbforums.com/showthread.php?t=250436&page=1
            > the funny thing that System.Manageme nt is documented on VS 2003 but still
            > the VS 2003 IDE doesn't recognize it as a valid namespace
            > it's also documented here
            > http://msdn.microsoft.com/library/de...management.asp
            > please help i really need a fast answer for this problem
            > thanx in advance
            > "Peter Bromberg [C# MVP]" wrote:
            >[color=green]
            > > Actually I think that should be:
            > >
            > > C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
            > >
            > >
            > > Co-founder, Eggheadcafe.com developer portal:
            > > http://www.eggheadcafe.com
            > > UnBlog:
            > > http://petesbloggerama.blogspot.com
            > >
            > >
            > >
            > >
            > > "Terry" wrote:
            > >[color=darkred]
            > > > If you have .Net 2.0 then it is in
            > > > c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
            > > >
            > > > "eric" wrote:
            > > >
            > > > > I'm writing a program in C# and found a couple of threads about how to
            > > > > check the status of a printer before sending it any data, to ensure
            > > > > that the printer is ready to print. They say to include the
            > > > > System.Manageme nt namespace. This is where my problem is, I have no
            > > > > System.Manageme nt namespace. Could anyone help me locate it or a
            > > > > reference to locate it?
            > > > >
            > > > >[/color][/color][/color]

            Comment

            • Fady Anwar

              #7
              RE: System.Manageme nt

              really thanx alot now i can see it in the system namespace tree in VS 2003
              but i would like to ask a q
              y it's not standard?

              "Peter Bromberg [C# MVP]" wrote:
              [color=blue]
              > Fady,
              > You have to set a hard reference in the project to the actual
              > System.Managmen t.dll assembly, its not standard in machine.config.
              >
              > Hope that helps!
              >
              > Peter
              >
              > --
              > Co-founder, Eggheadcafe.com developer portal:
              > http://www.eggheadcafe.com
              > UnBlog:
              > http://petesbloggerama.blogspot.com
              >
              >
              >
              >
              > "Fady Anwar" wrote:
              >[color=green]
              > > hi i've the same problem
              > > when i type
              > > using System.Manageme nt;
              > > and compile the VS gives me an error indicating that there is no namespace
              > > named System.Manageme nt
              > > i've tried this both on VS 2003 and VS 2005 using C# using both frameworks
              > > 1.1 and 2.0
              > > i was trying to make a windows based application using this namespace to
              > > fingerprint machines to protect my software from piracy
              > > here is a link fot that code
              > > http://www.vbforums.com/showthread.php?t=250436&page=1
              > > the funny thing that System.Manageme nt is documented on VS 2003 but still
              > > the VS 2003 IDE doesn't recognize it as a valid namespace
              > > it's also documented here
              > > http://msdn.microsoft.com/library/de...management.asp
              > > please help i really need a fast answer for this problem
              > > thanx in advance
              > > "Peter Bromberg [C# MVP]" wrote:
              > >[color=darkred]
              > > > Actually I think that should be:
              > > >
              > > > C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
              > > >
              > > >
              > > > Co-founder, Eggheadcafe.com developer portal:
              > > > http://www.eggheadcafe.com
              > > > UnBlog:
              > > > http://petesbloggerama.blogspot.com
              > > >
              > > >
              > > >
              > > >
              > > > "Terry" wrote:
              > > >
              > > > > If you have .Net 2.0 then it is in
              > > > > c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
              > > > >
              > > > > "eric" wrote:
              > > > >
              > > > > > I'm writing a program in C# and found a couple of threads about how to
              > > > > > check the status of a printer before sending it any data, to ensure
              > > > > > that the printer is ready to print. They say to include the
              > > > > > System.Manageme nt namespace. This is where my problem is, I have no
              > > > > > System.Manageme nt namespace. Could anyone help me locate it or a
              > > > > > reference to locate it?
              > > > > >
              > > > > >[/color][/color][/color]

              Comment

              • Nick Hounsome

                #8
                Re: System.Manageme nt

                You have to add a reference to everything that's not in mscorlib.dll or
                automatically referenced when you create a new project of a certain type (eg
                Windows App will reference the dll with System.Windows. Forms).

                There are several dlls because it would be inefficient to load and init a
                load of stuff that you aren't going to use.

                As I recall the documentation now tells you the name of the defining dll for
                every class etc.

                One reason why there are several dlls is to allow finer control of
                versioning.

                (Another reason for separate dlls is for separate assemblies because
                otherwise the scope of 'internal' would be too large - I'm not a fan of
                internal)

                "Fady Anwar" <FadyAnwar@disc ussions.microso ft.com> wrote in message
                news:130E099D-46FE-40A8-8033-6724F25550B7@mi crosoft.com...[color=blue]
                > really thanx alot now i can see it in the system namespace tree in VS 2003
                > but i would like to ask a q
                > y it's not standard?
                >
                > "Peter Bromberg [C# MVP]" wrote:
                >[color=green]
                >> Fady,
                >> You have to set a hard reference in the project to the actual
                >> System.Managmen t.dll assembly, its not standard in machine.config.
                >>
                >> Hope that helps!
                >>
                >> Peter
                >>
                >> --
                >> Co-founder, Eggheadcafe.com developer portal:
                >> http://www.eggheadcafe.com
                >> UnBlog:
                >> http://petesbloggerama.blogspot.com
                >>
                >>
                >>
                >>
                >> "Fady Anwar" wrote:
                >>[color=darkred]
                >> > hi i've the same problem
                >> > when i type
                >> > using System.Manageme nt;
                >> > and compile the VS gives me an error indicating that there is no
                >> > namespace
                >> > named System.Manageme nt
                >> > i've tried this both on VS 2003 and VS 2005 using C# using both
                >> > frameworks
                >> > 1.1 and 2.0
                >> > i was trying to make a windows based application using this namespace
                >> > to
                >> > fingerprint machines to protect my software from piracy
                >> > here is a link fot that code
                >> > http://www.vbforums.com/showthread.php?t=250436&page=1
                >> > the funny thing that System.Manageme nt is documented on VS 2003 but
                >> > still
                >> > the VS 2003 IDE doesn't recognize it as a valid namespace
                >> > it's also documented here
                >> > http://msdn.microsoft.com/library/de...management.asp
                >> > please help i really need a fast answer for this problem
                >> > thanx in advance
                >> > "Peter Bromberg [C# MVP]" wrote:
                >> >
                >> > > Actually I think that should be:
                >> > >
                >> > > C:\WINDOWS\Micr osoft.NET\Frame work\<version>\ System.Manageme nt.dll
                >> > >
                >> > >
                >> > > Co-founder, Eggheadcafe.com developer portal:
                >> > > http://www.eggheadcafe.com
                >> > > UnBlog:
                >> > > http://petesbloggerama.blogspot.com
                >> > >
                >> > >
                >> > >
                >> > >
                >> > > "Terry" wrote:
                >> > >
                >> > > > If you have .Net 2.0 then it is in
                >> > > > c:\windows\Micr osoft.Net\v2.0\ SystemManagemen t.dll.
                >> > > >
                >> > > > "eric" wrote:
                >> > > >
                >> > > > > I'm writing a program in C# and found a couple of threads about
                >> > > > > how to
                >> > > > > check the status of a printer before sending it any data, to
                >> > > > > ensure
                >> > > > > that the printer is ready to print. They say to include the
                >> > > > > System.Manageme nt namespace. This is where my problem is, I have
                >> > > > > no
                >> > > > > System.Manageme nt namespace. Could anyone help me locate it or a
                >> > > > > reference to locate it?
                >> > > > >
                >> > > > >[/color][/color][/color]


                Comment

                Working...