Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] don't delete NuGet.config files during MSBuild tests (#4901)
Running under .NET 5+, the `AndroidResourceChange` test would always fail with: The target _ResolveLibraryProjectImports should have been skipped. It turns out our test infrastructure was deleting `NuGet.config` on incremental builds. This triggers the `Restore` target to do its work again on every build changing `$(ProjectAssetsFile)`. This is an input of `_ResolveLibraryProjectImports`: <Target Name="_ResolveLibraryProjectImports" Inputs="$(ProjectAssetsFile)... We shouldn't ever delete `NuGet.config` files during MSBuild tests. This allowed the test to pass, and we can now run it under `dotnet`. The same was happening for `build.log`, `msbuild.binlog`, and `process.log`, so I thought it would be good to skip deletion of `.log` or `.binlog` files. I also cleaned up the test a little to use `AssertTargetIsSkipped`.
- Loading branch information