<p>When trying to execute from within Visual Studio 2008 your application and you get the (uninformative) message "The operation could not be completed".</p>

<p>The solution to this is to turn off the "Visual Studio Hosting Process".</p>

<p>The problem with turning off this "hosting process" is that all the "run and rewrite" functionality is no longer available. OK, so this isn't a big deal, but I'm <em>always</em> getting this message no matter what machine I use (and it might be nice once in a while to use the rewrite and execute functionality).</p>

<p>Am I doing something wrong? How come this "feature" within VS seems to complain so readily? Do other people have success with enabling the hosting process and making use of it?</p>

[{'answer_id': 33374, 'author': 'Nick Berardi', 'author_id': 17, 'author_profile': 'https://Stackoverflow.com/users/17', 'pm_score': 0, 'selected': False, 'text': '<p>I honestly have never seen this message and I work with Visual Studio for at least 8 hours a day.  Is this reproducible on other machines?  If so is there anything weird or abnormal in your code that could cause this to crash?</p>\n'}, {'answer_id': 34236, 'author': 'Calanus', 'author_id': 445, 'author_profile': 'https://Stackoverflow.com/users/445', 'pm_score': 0, 'selected': False, 'text': "<p>I use 4 different machines and have got this situation on all of them. I understand what is causing the problem - it is that the VS hosting process isn't terminating after the first debug session ends, which means that the next time that you try to compile the exe the hosting process is locking the exe and preventing compilation. Another solution therefore is to use Task Manager to kill the VS hosting process and compile and debug as normal but thats even more of a hassle!</p>\n\n<p>I can't think that its anything in my code that would be causing this - its probably a VS issue itself isn't it?</p>\n"}, {'answer_id': 34287, 'author': 'Martin', 'author_id': 770, 'author_profile': 'https://Stackoverflow.com/users/770', 'pm_score': 1, 'selected': False, 'text': '<p>Is your project output folder set to a network share?</p>\n\n<p>If so, try changing it to a local folder and see what happens.  It appears that VS is not always able to terminate the process if the host exe is running from a share.</p>\n\n<p>The other possibility is that the project is open and running in debug mode on another instance of Visual Studio - although I suspect you will allready have ensured this is not the case.</p>\n'}, {'answer_id': 38843, 'author': 'Steve Steiner', 'author_id': 3892, 'author_profile': 'https://Stackoverflow.com/users/3892', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>The problem with turning off this "hosting process" is that all the "run and rewrite" functionality is no longer available.</p>\n</blockquote>\n\n<p>The Visual Studio Hosting Process is not needed to allow Edit and Continue.  It is used for "Design time expression Evalutation" in the case where the project is a dll rather than an EXE. It is also used to provide debugging for partial trust scenarios.  See the <a href="http://msdn.microsoft.com/en-us/library/ms242202.aspx" rel="nofollow noreferrer">documentation</a> for everything it does.</p>\n\n<p>It is highly unlikely it does anything you need, so don\'t feel bad <a href="http://msdn.microsoft.com/en-us/library/ms185330.aspx" rel="nofollow noreferrer">turning it off</a>.</p>\n'}, {'answer_id': 358649, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Here\'s the anwser: disable "Enable he Visual Studio hosting process" in he debug tab of your projects properties.</p>\n\n<p>I found it here:\n<a href="http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/40d2d241-a0c0-4137-9da9-e40611972c0e/" rel="nofollow noreferrer">http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/40d2d241-a0c0-4137-9da9-e40611972c0e/</a></p>\n'}, {'answer_id': 8258531, 'author': 'Mark', 'author_id': 1064125, 'author_profile': 'https://Stackoverflow.com/users/1064125', 'pm_score': -1, 'selected': False, 'text': '<p>Probably your web hosting already turn of the network function, you can open a ticket to contact with your web host to confirm, or anything you did would be useless.</p>\n\n<p>Some <a href="http://www.webhost4lifereview.com/visual-studio-hosting/" rel="nofollow">visual studio hosting</a> can be found at here.</p>\n\n<p>Good luck,</p>\n\n<p>Mark</p>\n'}, {'answer_id': 50497064, 'author': 'Murat Yıldız', 'author_id': 1604048, 'author_profile': 'https://Stackoverflow.com/users/1604048', 'pm_score': 0, 'selected': False, 'text': '<p>There are several causes and workarounds regarding to this problem and you might try the following ones that are useful most of the time:</p>\n\n<blockquote>\n  <p>Delete the <em>"Your_Solution_FileName.suo"</em> file and restart Visual Studio.</p>\n</blockquote>\n\n<p>or </p>\n\n<blockquote>\n  <p>Right click on the project and select Unload Project and then click Reload Project by right clicking on the project again might also fix it.</p>\n</blockquote>\n\n<p>Hope this helps...</p>\n'}]
['https://Stackoverflow.com/questions/33338', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/445/']