Debug error - The operation could not be completed - by Andrew RFA

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 740192 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 5/2/2012 7:11:14 AM
Access Restriction Public


After debugging a Visual Basic program, I made some amendments to it.

When I tried to debug the program again, the build succeeded, then this error was displayed:

The operation could not be completed.

The process cannot access the file because it is being used by another process.
Sign in to post a comment.
Posted by scsi.king on 12/29/2012 at 8:20 AM
Hi, I just ran into this same problem. I am using Visual Studio 2010 sp1. I have been working with the same project for a couple of days now without incident. I published the project yesterday to see how it run, and now when I came back to start working again the next day, I got the error mentioned in this article right away.
If I close the visual studio and reopen, I can run my project successfully. After the first run, I get this file process error.

I unchecked the 'Enable the Visual Studio hosting process' and agreed that NO SECURITY would be possible from now on without this option on, and I can now run my development app. So I think something happened when I published the app.

My project uses Windows Forms and uses the following .Net libraries: Imports System.Linq Imports System.IO ' Imports System.Collections. Also the OS is Windows 7 64-bit, SP1 fully patched.
Posted by Microsoft on 5/11/2012 at 10:09 AM
Great. Although ideally we'd dig into why this happened, it would be expensive for both of us. The hosting process is a "trick" to speed up F5. In some cases, it just doesn't and can't work, and this is apparently one.
Posted by Andrew RFA on 5/11/2012 at 2:38 AM
Following the advice in question 3 cured the problem.

In Visual Basic, I clicked on:

Project on the toolbar
<Project Name> Properties on the drop down list
Debug on the drop down list

I unchecked the box for 'Enable the Visual Studio hosting process'.

After restarting Visual Basic, the 'operation could not be completed' error no longer appears.

Thank you for your help.
Posted by Microsoft on 5/10/2012 at 6:44 PM
Hi there,
Can you please provide some more info since we can't reproduce this here:
(1) Does it happen with a "console application" or just a "windows forms" application (or something else)?
(2) Does it happen with C#?
(3) Does it still happen if you disable the hosting process? To do this, go to Properties for your project, then to the Debug tab. Uncheck "enable the Visual Studio hosting process", restart VS, and try to repro again.
Posted by Microsoft on 5/8/2012 at 10:55 PM
Thank you for submitting feedback on Visual Studio 11 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.
Posted by MS-Moderator08 [Feedback Moderator] on 5/2/2012 at 11:05 PM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided.

To help us better understand the scenario, could you please attach a video to this feedback through our site?

we can refer to the following link to make a video. Thanks for your understanding.

Thank you.

Posted by MS-Moderator01 on 5/2/2012 at 7:43 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(