Where is *.vshost.exe coming from?

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

    Where is *.vshost.exe coming from?

    I have a VS.NET 2005 solution with 10 projects. I have unbinded all
    projects, closed and reopened the solution. When I build, via Nant, I
    copy all of the PDB and DLLs to the EXE bin/debug folder. Source Safe
    is not running. I see a myapp.vshost.ex e in the bin/debug folder. I
    cannot delete it. I can't kill that process either.

    When I do a build, I want to clean out the bin/debug folder. However,
    the myapp.vshost.ex e file locks DLLs and prevents me from cleaning the
    bin/debug folder. Because I'm building via Nant and not using VS.NET
    Source Safe integration, I don't see where the *.vshost.exe file is
    coming from. I have closed the solution and VS.NET but still get the
    file.

    Any ideas?

    Thanks,
    Brett

  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Where is *.vshost.exe coming from?

    Brett,

    The vshost.exe file is created by VS.NET for you. This is a shell that
    runs your program when you debug. One of the main purposes, if I recall
    correctly, is so that it can set security correctly in case you want to run
    in something other than full trust.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Brett Romero" <account@cygen. com> wrote in message
    news:1142279039 .412739.210040@ p10g2000cwp.goo glegroups.com.. .[color=blue]
    >I have a VS.NET 2005 solution with 10 projects. I have unbinded all
    > projects, closed and reopened the solution. When I build, via Nant, I
    > copy all of the PDB and DLLs to the EXE bin/debug folder. Source Safe
    > is not running. I see a myapp.vshost.ex e in the bin/debug folder. I
    > cannot delete it. I can't kill that process either.
    >
    > When I do a build, I want to clean out the bin/debug folder. However,
    > the myapp.vshost.ex e file locks DLLs and prevents me from cleaning the
    > bin/debug folder. Because I'm building via Nant and not using VS.NET
    > Source Safe integration, I don't see where the *.vshost.exe file is
    > coming from. I have closed the solution and VS.NET but still get the
    > file.
    >
    > Any ideas?
    >
    > Thanks,
    > Brett
    >[/color]


    Comment

    • Marina Levit [MVP]

      #3
      Re: Where is *.vshost.exe coming from?



      "Brett Romero" <account@cygen. com> wrote in message
      news:1142279039 .412739.210040@ p10g2000cwp.goo glegroups.com.. .[color=blue]
      >I have a VS.NET 2005 solution with 10 projects. I have unbinded all
      > projects, closed and reopened the solution. When I build, via Nant, I
      > copy all of the PDB and DLLs to the EXE bin/debug folder. Source Safe
      > is not running. I see a myapp.vshost.ex e in the bin/debug folder. I
      > cannot delete it. I can't kill that process either.
      >
      > When I do a build, I want to clean out the bin/debug folder. However,
      > the myapp.vshost.ex e file locks DLLs and prevents me from cleaning the
      > bin/debug folder. Because I'm building via Nant and not using VS.NET
      > Source Safe integration, I don't see where the *.vshost.exe file is
      > coming from. I have closed the solution and VS.NET but still get the
      > file.
      >
      > Any ideas?
      >
      > Thanks,
      > Brett
      >[/color]


      Comment

      • Brett Romero

        #4
        Re: Where is *.vshost.exe coming from?

        It seems to lock these files randomly. What is the reason for holding
        them as locked if I'm not debugging? How does the "clean" feature in
        Studio work if they are locked?

        Brett

        Comment

        • Marina Levit [MVP]

          #5
          Re: Where is *.vshost.exe coming from?

          I've found that as long as I keep VS open with that project, those files
          will be locked. If you shut down the IDE, they go away.

          I couldn't tell you the reason they stay locked. Why does it matter to you?
          I've sort of largely ignored these files, and been fine so far.

          "Brett Romero" <account@cygen. com> wrote in message
          news:1142283306 .591014.132260@ i40g2000cwc.goo glegroups.com.. .[color=blue]
          > It seems to lock these files randomly. What is the reason for holding
          > them as locked if I'm not debugging? How does the "clean" feature in
          > Studio work if they are locked?
          >
          > Brett
          >[/color]


          Comment

          • Brett Romero

            #6
            Re: Where is *.vshost.exe coming from?

            >Why does it matter to you?

            As I mentioned, I want to delete the files on every new build.

            Brett

            Comment

            • Willy Denoyette [MVP]

              #7
              Re: Where is *.vshost.exe coming from?


              "Brett Romero" <account@cygen. com> wrote in message
              news:1142292288 .300431.154630@ i40g2000cwc.goo glegroups.com.. .
              | >Why does it matter to you?
              |
              | As I mentioned, I want to delete the files on every new build.
              |
              | Brett
              |

              Don't use the hosting process then, you can turn it off in your project
              settings.

              Willy.


              Comment

              • Brett Romero

                #8
                Re: Where is *.vshost.exe coming from?

                Doesn't that turn off debugging capabilities and other features I need?
                I don't want to loose features. Just stop the file locking.

                Brett

                Comment

                • Willy Denoyette [MVP]

                  #9
                  Re: Where is *.vshost.exe coming from?

                  I turn it off all the time, never had any problems while debugging. I turn
                  it off because I had too many issues with this, I want my application to run
                  in it's own process not in a host that keeps running and is supposed to
                  load/unload my application. Don't forget that when hosting your security
                  context is the context of the host, which may lead to surprises when you
                  change the context in your code.

                  Willy.

                  "Brett Romero" <account@cygen. com> wrote in message
                  news:1142294679 .744127.30920@j 52g2000cwj.goog legroups.com...
                  | Doesn't that turn off debugging capabilities and other features I need?
                  | I don't want to loose features. Just stop the file locking.
                  |
                  | Brett
                  |


                  Comment

                  • scott blood

                    #10
                    Re: Where is *.vshost.exe coming from?

                    VSHOST.exe is the hosting process used by Visual Studio.

                    A copy of this is created every time you build you run your project
                    (currently i use F5). It is suppost to provide improved performance when
                    running your project from within the IDE. It also offers the ability to use
                    Partial Trust Debugging and design time expression evaluation.

                    Removing this process from the process list will cause problems when running
                    the IDE because Visual Studio requires this process indefinatly when your
                    project is in run mode.

                    Regards
                    Scott Blood
                    C# Developer

                    "Willy Denoyette [MVP]" <willy.denoyett e@telenet.be> wrote in message
                    news:uuFLPlBSGH A.1780@TK2MSFTN GP12.phx.gbl...[color=blue]
                    >I turn it off all the time, never had any problems while debugging. I turn
                    > it off because I had too many issues with this, I want my application to
                    > run
                    > in it's own process not in a host that keeps running and is supposed to
                    > load/unload my application. Don't forget that when hosting your security
                    > context is the context of the host, which may lead to surprises when you
                    > change the context in your code.
                    >
                    > Willy.
                    >
                    > "Brett Romero" <account@cygen. com> wrote in message
                    > news:1142294679 .744127.30920@j 52g2000cwj.goog legroups.com...
                    > | Doesn't that turn off debugging capabilities and other features I need?
                    > | I don't want to loose features. Just stop the file locking.
                    > |
                    > | Brett
                    > |
                    >
                    >[/color]


                    Comment

                    • Willy Denoyette [MVP]

                      #11
                      Re: Where is *.vshost.exe coming from?

                      You don't have to remove it from the "process list" (that is kill it), you
                      need to disable the option in your project settings (see Debug options).
                      When it's disabled, VS will no longer spawns the host when debugging. This
                      option is only valuable on slower boxes as it speeds up the loading process
                      of an application when debugging, but on reasonable fast systems the
                      differences aren't visible at all.


                      Willy.


                      "scott blood" <scott_blood@ho tmail.com> wrote in message
                      news:%23Zt34pBS GHA.4264@TK2MSF TNGP11.phx.gbl. ..
                      | VSHOST.exe is the hosting process used by Visual Studio.
                      |
                      | A copy of this is created every time you build you run your project
                      | (currently i use F5). It is suppost to provide improved performance when
                      | running your project from within the IDE. It also offers the ability to
                      use
                      | Partial Trust Debugging and design time expression evaluation.
                      |
                      | Removing this process from the process list will cause problems when
                      running
                      | the IDE because Visual Studio requires this process indefinatly when your
                      | project is in run mode.
                      |
                      | Regards
                      | Scott Blood
                      | C# Developer
                      |
                      | "Willy Denoyette [MVP]" <willy.denoyett e@telenet.be> wrote in message
                      | news:uuFLPlBSGH A.1780@TK2MSFTN GP12.phx.gbl...
                      | >I turn it off all the time, never had any problems while debugging. I
                      turn
                      | > it off because I had too many issues with this, I want my application to
                      | > run
                      | > in it's own process not in a host that keeps running and is supposed to
                      | > load/unload my application. Don't forget that when hosting your security
                      | > context is the context of the host, which may lead to surprises when you
                      | > change the context in your code.
                      | >
                      | > Willy.
                      | >
                      | > "Brett Romero" <account@cygen. com> wrote in message
                      | > news:1142294679 .744127.30920@j 52g2000cwj.goog legroups.com...
                      | > | Doesn't that turn off debugging capabilities and other features I
                      need?
                      | > | I don't want to loose features. Just stop the file locking.
                      | > |
                      | > | Brett
                      | > |
                      | >
                      | >
                      |
                      |


                      Comment

                      Working...