Using the default codespaces image,
NuGetPackageRoot is set to
/var/nuget, but like most other MSBuild directory properties, it is supposed to end in a slash/backslash.
I’m using the workaround to get coverlet working with deterministic builds. Since I have
<SourceRoot Include="$(NuGetPackageRoot)" />, this causes the build to fail with
/opt/dotnet/sdks/3.1.301/sdk/3.1.301/Roslyn/Microsoft.Managed.Core.targets(104,5): error : SourceRoot paths are required to end with a slash or backslash: '/var/nuget' [/home/codespace/workspace/Comparers/src/Nito.Comparers.Core/Nito.Comparers.Core.csproj]