Visual Studio 2015 and uwp development - User-Mapped section error and CopyWin32Resources error

5

Continuing with some UWP development and 2 things keep happening with visual studio and I can't work out if its a VS2015 bug, the fact that I am deploying to a windows Mobile 10 device or something else.

Randomly when I try to build or deploy to my device I get either.

Could not copy "obj\ARM\Debug\MyApp.exe" to "bin\ARM\Debug\MyApp.exe". Exceeded retry count of 10. Failed.

Unable to copy file "obj\ARM\Debug\MyApp.exe" to "bin\ARM\Debug\MyApp.exe". The requested operation cannot be performed on a file with a user-mapped section open.

or I get

CopyWin32Resources failed with exit code 500

Seems to be random and I can't nail down what is causing either. Googling didn't really help. Some said Anti-virus but disabling mine did nothing. Some said it was something to do with Visual Studio Achievements Extension but I don't have it installed.

Anyone know the cause or a fix? Making development difficult when I can't deploy.

UPDATE: Ok so the first set of errors is more related to Windows 10 I think. When the error appears again I try to manually copy the file and when I do I receive similar error in explorer.

error 0x800704c8: the requested operation cannot be performed on a file with a user-mapped section open.

c#
visual-studio-2015
uwp
asked on Stack Overflow Feb 5, 2016 by Gaz83 • edited Jun 20, 2020 by Community

4 Answers

5

can you try those things:

  • Close all other VS windows except one.
  • Clean the project you works on.
  • Try build project. If you get same errors, close all VS windows.
  • Delete 'bin' and 'obj' folders.
  • Open VS again and try building your project.

Then try deploying your project.

0

I know you might have found a fix already. But I had the same error after installing new emulators for my uwp application, after installing these emulators I seem to have gotten those errors. I thought uninstalling these emulators would be the fix, but was not. Now I run my program without restoring any missing packages and it seems to be the fix.

answered on Stack Overflow Oct 27, 2016 by Stefan
0

For anyone still facing the CopyWin32Resources Error on Windows, try uninstalling CbDefense (both Carbon Black Sensor and CB Defense Sensor 64bit). To much disbelief, this solution suggested by Microsoft resolved the issue for me!

answered on Stack Overflow Aug 5, 2020 by Anurag S Sharma
-1

Fixed the problem. Moved the project out of the Visual Studio Project folder in My documents folder and into a projects folder on the C Drive. None of the errors have returned so I am guessing this is a windows 10 issue.

answered on Stack Overflow Feb 6, 2016 by Gaz83 • edited Feb 7, 2016 by Gaz83

User contributions licensed under CC BY-SA 3.0