runtime: Build for System.Runtime fails within VS

Cleaned and synced to today

build.cmd clr+libs -rc release
build.cmd -subset libs.tests -rc release
build.cmd -subset libs.tests -framework net48 -rc release
build -vs System.Runtime

Build in VS and it fails with

7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018: The "GenerateDepsFile" task failed unexpectedly.
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ReferenceInfo.GetVersion(ITaskItem referencePath)
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ReferenceInfo.CreateReferenceInfo(ITaskItem referencePath)
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ReferenceInfo.CreateReferenceInfos(IEnumerable`1 referencePaths)
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateDepsFile.WriteDepsFile(String depsFilePath)
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateDepsFile.ExecuteCore()
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute()
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
7>C:\git\runtime\.dotnet\sdk\5.0.100-preview.8.20362.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.targets(195,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
7>Done building project "System.Runtime.Tests.csproj" -- FAILED.

I have a design time binlog available.

Reproes with both VS 16.8.0 and 16.6.5.

From the binlog we know it’s when VS is trying to build with TF=Unix.

@ericstj any thoughts? @ViktorHofer and @safern are puzzled.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (16 by maintainers)

Most upvoted comments

The issue here is that we have just buid net5.0-windows from the root and trying to build the tests for net5.0-unix as well from the vs. When we build from the vs, it doesn’t build all the project references and expects that these are already built. Doing a build on tests

1>------ Build started: Project: System.Runtime (ref\System.Runtime), Configuration: Debug Any CPU ------
2>------ Build started: Project: TestUtilities, Configuration: Debug Any CPU ------
3>------ Build started: Project: TestUtilities.Unicode, Configuration: Debug Any CPU ------
1>System.Runtime -> C:\git\runtime\artifacts\bin\System.Runtime\ref\net5.0-Debug\System.Runtime.dll
4>------ Build started: Project: System.Runtime (src\System.Runtime), Configuration: Debug Any CPU ------
2>TestUtilities -> C:\git\runtime\artifacts\bin\TestUtilities\net461-Debug\TestUtilities.dll
3>TestUtilities.Unicode -> C:\git\runtime\artifacts\bin\TestUtilities.Unicode\net5.0-Debug\TestUtilities.Unicode.dll
4>System.Runtime -> C:\git\runtime\artifacts\bin\System.Runtime\net5.0-Debug\System.Runtime.dll
5>------ Build started: Project: TestCollectibleAssembly, Configuration: Debug Any CPU ------
6>------ Build started: Project: TestLoadAssembly, Configuration: Debug Any CPU ------
6>TestLoadAssembly -> C:\git\runtime\artifacts\bin\TestLoadAssembly\netstandard2.0-Debug\TestLoadAssembly.dll
5>TestCollectibleAssembly -> C:\git\runtime\artifacts\bin\TestCollectibleAssembly\netstandard2.0-Debug\TestCollectibleAssembly.dll
2>TestUtilities -> C:\git\runtime\artifacts\bin\TestUtilities\net5.0-Debug\TestUtilities.dll
7>------ Build started: Project: System.Runtime.Tests, Configuration: Debug Any CPU ------
8>------ Build started: Project: System.Runtime.Nls.Tests, Configuration: Debug Any CPU ------
8>System.Runtime.Nls.Tests -> C:\git\runtime\artifacts\bin\System.Runtime.Nls.Tests\net5.0-Windows_NT-Debug\System.Runtime.Nls.Tests.dll
7>System.Runtime.Tests -> C:\git\runtime\artifacts\bin\System.Runtime.Tests\net5.0-Browser-Debug\System.Runtime.Tests.dll
7>System.Runtime.Tests -> C:\git\runtime\artifacts\bin\System.Runtime.Tests\net5.0-Unix-Debug\System.Runtime.Tests.dll
7>System.Runtime.Tests -> C:\git\runtime\artifacts\bin\System.Runtime.Tests\net5.0-Windows_NT-Debug\System.Runtime.Tests.dll
========== Build: 8 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========

i will try Adding all the project dependencies to the sln.