Open jonathanpeppers opened 5 years ago
@jonathanpeppers - do your tests run with different (isolated) temp directories?
The projects themselves, yes they each are in a separate directory.
It’s a directory such as bin\Debug\temp\UniqueTestName
. They get deleted on [TearDown]
.
Details about Problem
We have a set of MSBuild integration tests in Xamarin.Android that do these kinds of things:
foo.csproj
in a directorymsbuild /t:restore foo.csproj
(or use/restore
)/t:build
, do things, assertions, etc.These tests use NUnit, and we are using the parallel feature to speed up our test runs. Occasionally we hit a random failure in
/t:restore
if two processes are restoring the same NuGet package in two different projects at once. I added theNUGET_SHOW_STACK=true
environment variable to get the stack trace:NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe):
$(MSBuildVersion)=15.9.21
VS version (if appropriate):
VS 2017 15.9.7
OS version (i.e. win10 v1607 (14393.321)):
DevDiv Pool, says: Windows_NT 10.0.14393
Worked before? If so, with which NuGet version:
no
Detailed repro steps so we can see the same problem
I'm not sure you can repro easily... We see this on our CI due to how our tests work.
Other suggested things
Related:
I am looking into using "isolated mode", as there are likely other problems the way our tests run in parallel.
Verbose Logs
MSBuild binlog: nuget.zip