Click here to Skip to main content
15,868,292 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I just moved all my projects to a network drive and mapped it as a network drive Z

The problem occurs when rebuilding and debugging a Windows Forms Application. After hanging the code and pressing F5 I sometimes get the following error:

"The operation could not be completed. The process cannot access the file because it is being used by another process."

Hitting "OK" closes the dialog box and F5 starts the debug process normally. This only occurs after making a program change and hitting F5 to debug the program.


What I have tried:

I have tried building the solution before debugging. Building goes well; no errors. Press F5, and the error occurs. Program debugging ALWAYS works after acknowledging the error.
Checked permissions on the mapped drive, but it doesn't prevent loading or saving of projects.

Has anyone seen this problem?
Posted
Comments
Suvendu Shekhar Giri 7-Oct-16 12:42pm    
If I understod correctly, you are trying to run an application that resides on a network drive from you local machine with Visual Studio, right?
Mehdi Gholam 7-Oct-16 13:15pm    
Is the share being used by others?
Richard MacCutchan 7-Oct-16 13:48pm    
This was a Visual Studio bug a few versions ago, and due to timing within the various spawned processes, if I remember correctly. It may be a similar issue due to your files being on a network drive where the clocks are not in sync. If the problem never occurs if the projects are on a local drive then you know the answer.
ZurdoDev 7-Oct-16 14:25pm    
If this is Windows 10 I know it has issues (possibly permissions related) with mapped drives.

I recommend not using mapped drives to write code.
Andrew Alix 10-Oct-16 21:15pm    
Thank you all for your comments. I tend to agree that I shouldn't use mapped network drives. Speed is quite a bit slower, and of course the problem.

My whole purpose for this, was that I work on two separate machines and wanted to always access the correct and up-to-date code.

I have therefore decided to keep it local and copy it each time to the machine I'm working from. I share the PC's on the network anyway.

Again. Thank you all for your help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900