• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1630
  • Last Modified:

Problem with [solutionname].vshost.exe when debugging in Visual Studio 2005

Hi all,

When I try to run a debug on a solution I'm curently developing in VB .NET 2005, I continually get the following messages (they are translated from the German as my system is in German):

1st try:  Operation could not be completed.  The process cannot access a file, as it is being used by another process."

2nd try: "Could not copy a support file, [...] [solutionname].vshost.exe." Please verify that the path exists and is writeable."

The path exists and is writeable.

If I make these two tries at debugging and then close and reopen visual studio, the problem disappears and I can debug, but as soon as I modify any code the problem reappears, and I have to restart Visual Studio.

If I do not make these two tries and close and reopen Visual Studio, restarting the program does not make the problem go away.

Anyone know what could be causing this strange behaviour?

Thanks in advance,

JaimeHy
0
jaimehy
Asked:
jaimehy
  • 3
  • 2
  • 2
  • +1
1 Solution
 
Jaime OlivaresSoftware ArchitectCommented:
>>When I try to run a debug on a solution I'm curently developing in VB .NET 2005
What do you mean? are you trying to run debugger after an exception?
0
 
jaimehyAuthor Commented:
Many thanks for your interest Jaime,

What I mean is simply pressing F5.  The program builds successfully, but doesn't open in debug mode.  As I say, I just get the messages described above.

Best wishes,

your namesake,

JaimeHy
0
 
Jaime OlivaresSoftware ArchitectCommented:
Maybe a corrupted file
I suggest you to create a new solution, and attach all your existing source files to it.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
SteveH_UKCommented:
This happens when VS doesn't release a lock on a file it creates as part of the debugging process.  The best you can do is rename the old file while VS is running, or delete it when it is not.

There is no way round it that I have found in 2005, and it happens a lot, but irregularly! :(

However, the way round that I've suggested always works.
0
 
SteveH_UKCommented:
The .vshost.exe program provides the interface to Visual Studio for debugging, and is created as part of the debug execution (F5) step, and so it can be deleted any time.
0
 
jaimehyAuthor Commented:
Much obliged SteveH, this business was driving me mad.

This problem has come up more than once with me, so it's great to have a solution!

Thanks,

Jaime  
0
 
SteveH_UKCommented:
No problem.  It is quite a frequent issue.
0
 
PizpotCommented:
It is a pain that is for sure! If I try to do both debugging and building, I get the same errors. (2008 Express)

"To disable the hosting process clear the Enable the Visual Studio hosting process checkbox in the project properties window and recompile the solution."
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now