DefaultSolutionRootFinder = x => x.Substring(0, x.LastIndexOf("\\bin\\", StringComparison.Ordinal));
VSTS build agents don't seem to have a \\bin\\ directory, causing this to fail on static construction.
The main issue is that it throws before being able to reassign SolutionRootFinder.
Maybe:
DefaultSolutionRootFinder = x =>
{
var index = x.LastIndexOf("\\bin\\", StringComparison.Ordinal);
if (index < 0)
return String.Empty;
else
return x.Substring(0, index);
}
I can put this in a PR if you'd like, or let me know if I've messed up somewhere.
DefaultSolutionRootFinder = x => x.Substring(0, x.LastIndexOf("\\bin\\", StringComparison.Ordinal));
VSTS build agents don't seem to have a
\\bin\\
directory, causing this to fail on static construction. The main issue is that it throws before being able to reassignSolutionRootFinder
.Maybe:
I can put this in a PR if you'd like, or let me know if I've messed up somewhere.