Build Error - Unable to Copy File
When I start a build I have been getting the following error constantly (latest EAP as of the date of this post):
Microsoft.Common.CurrentVersion.targets(4187, 5): [MSB3021] Unable to copy file "" to "".
The requested operation cannot be performed on a file with a user-mapped section open.
I ended up having to kill the process to start the build. I then start the build and get the following error:
Microsoft.Common.CurrentVersion.targets(4358, 5): [MSB3027]
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(4358,5):
error MSB3027: Could not copy "C:\...web-data.dll" to "bin\Debug\net471\...web-data.dll".
Exceeded retry count of 10. Failed. The file is locked by: "...-web.exe (10392)"
This error happens all of the time unless I kill the running process first. This is a show stopper for Rider. I can consistently build, run, build, run.. within Visual Studio and it all works fine.
However, If I restart my machine and build with Rider it works fine then I can run the changes BUT when I go to build again I keep running into this.
It's NOT an acceptable route to kill a process to perform a build to test the code - this is fundamental.
Any suggestions would be welcome otherwise I'll have to go back to Visual Studio.
Please sign in to leave a comment.
Since I can't edit my original post let me specify what I am running, my apologies for leaving it out:
This issue was fixed in the latest EAP build. Could you please give it a try and let me know if the issue persists?
Thank you!
Seems to be working fine, so far, all good.