Visual Studio 2012 warning MSB3026: Could not copy

2019-04-03 10:34发布

I keep getting:

warning MSB3026: Could not copy dlls errors.

I have several projects in the solution.

On build, I also get the error:

Error 47 Could not copy "myapp\bin\Debug*.dll" to "bin*.dll". Exceeded retry count of 10. Failed.

The application just stops responding in the middle of debugging, and I have to close Visual Studio every time. Which was annoying, but now it's getting frustrating as well.

We are eight team members, and all of us are getting the same error. We can't rebuild the solution, and the application is running very slow.

One of things we are using in the project is SignalR.

These are the things I have tried so far. They didn't help me, but they might help the reader:

  1. I have tried solutions described in Visual Studio debugging/loading very slow, but that didn't work.

  2. I have also tried unchecking Enable the Visual Studio hosting process in each project properties and that didn't fix the issue either.

  3. Solutions are described in http://www.richard-banks.org/2008/04/how-to-fix-problems-with-locked-files.html and http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/40ed753e-47af-4638-8a72-1d607102a05c/

  4. Pre-build scripts on the projects: if exist "$(TargetPath).locked" del "$(TargetPath).locked" if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"

  5. The bin folders are not under source control.

  6. Sometimes killing the Microsoft.VisualStudio.Web.Host.exe process releases the lock on the files, but this does not always work.

  7. I am running Visual Studio in administrator mode.

  8. I have full access (permissions read/write) on the source code folders.

8条回答
家丑人穷心不美
2楼-- · 2019-04-03 11:04

I had the same issue. It seems that the dlls visual studio trying to copy is corrupt or something like that. I tried to copy the particular dlls to my desktop but it failed with error message. So I replaced the entire dlls with the fresh ones, which solved my problem. Hope that helps.

查看更多
smile是对你的礼貌
3楼-- · 2019-04-03 11:04

I had the same issue.Clear the browser history and build the project. which solved my problem. Hope that helps.

查看更多
登录 后发表回答