Bug 9951 - Build fails following debugging of unit tests
Summary: Build fails following debugging of unit tests
Status: RESOLVED DUPLICATE of bug 19708
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Debugger ()
Version: 3.0.x
Hardware: PC Windows
: Low normal
Target Milestone: Future Cycle (TBD)
Assignee: David Karlaš
URL:
Depends on:
Blocks:
 
Reported: 2013-01-31 13:31 UTC by Scott Stephens
Modified: 2016-11-07 10:41 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 19708

Description Scott Stephens 2013-01-31 13:31:10 UTC
When building with MSBuild/XBuild setting, and debugging nunit unit tests using the MS .NET debugger, then making some changes to the project, the build will periodically fail with the following message:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(5,5): Warning MSB3026: Could not copy "C:\<snip>\mathnet-numerics\out\debug\Net40\MathNet.Numerics.dll" to "..\..\out\test\debug\Net40\MathNet.Numerics.dll". Beginning retry 4 in 1000ms. The process cannot access the file '..\..\out\test\debug\Net40\MathNet.Numerics.dll' because it is being used by another process. (MSB3026) (UnitTests)

It doesn't happen every time, but often enough to make it pretty annoying. I was never able to reproduce it on a small test project, so having a big project might be an important part of the situation.  The Math.Net Numerics project is what I was working with, so would make a suitable test project (http://numerics.mathdotnet.com/).  I'm also not 100% sure that MSBuild/XBuild is required to trigger the issue, because the project doesn't build at all without that setting.
Comment 1 Marius Ungureanu 2016-11-07 09:38:04 UTC
File in use bug caused by the debugger. Assigning to the correct product.
Comment 2 David Karlaš 2016-11-07 10:41:35 UTC

*** This bug has been marked as a duplicate of bug 19708 ***