dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.85k stars 4.01k forks source link

Can only build Roslyn.sln a single time before building breaks. #74153

Open CyrusNajmabadi opened 2 months ago

CyrusNajmabadi commented 2 months ago

Using:

image

Repro steps.

  1. Build Roslyn.sln.
  2. Build Roslyn.sln again

First time succeeds with:

WARNING: Potential build performance issue in 'IntegrationTestBuildProject.csproj'. The project does not appear up-to-date after a successful build: Output 'D:\github\roslyn\artifacts\bin\IntegrationTestBuildProject\Debug\net45\IntegrationTestBuildProject.dll' does not exist, not up-to-date. See https://aka.ms/incremental-build-failure.
========== Rebuild All: 207 succeeded, 0 failed, 0 skipped ==========
========== Rebuild completed at 2:10 PM and took 03:20.100 minutes ==========
Build started at 2:10 PM...
1>------ Build started: Project: Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost, Configuration: Debug Any CPU ------
2>------ Build started: Project: TestDiscoveryWorker, Configuration: Debug Any CPU ------
3>------ Build started: Project: Roslyn.VisualStudio.Setup.Dependencies, Configuration: Debug Any CPU ------
4>------ Build started: Project: BuildBoss, Configuration: Debug Any CPU ------
5>------ Build started: Project: VBCSCompiler-arm64, Configuration: Debug Any CPU ------
6>------ Build started: Project: csc-arm64, Configuration: Debug Any CPU ------
7>------ Build started: Project: StackDepthTest, Configuration: Debug Any CPU ------
8>------ Build started: Project: csc, Configuration: Debug Any CPU ------
9>------ Build started: Project: VBCSCompiler, Configuration: Debug Any CPU ------
10>------ Build started: Project: vbc-arm64, Configuration: Debug Any CPU ------
11>------ Build started: Project: csi, Configuration: Debug Any CPU ------
12>------ Build started: Project: BuildValidator, Configuration: Debug Any CPU ------
13>------ Build started: Project: vbc, Configuration: Debug Any CPU ------
14>------ Build started: Project: vbi, Configuration: Debug Any CPU ------
15>------ Build started: Project: InteractiveHost64, Configuration: Debug Any CPU ------
16>------ Build started: Project: InteractiveHost32, Configuration: Debug Any CPU ------
17>------ Build started: Project: Roslyn.VisualStudio.ServiceHub.Setup.x64, Configuration: Debug Any CPU ------
18>------ Build started: Project: Roslyn.VisualStudio.ServiceHub.Setup.arm64, Configuration: Debug Any CPU ------
19>------ Build started: Project: Roslyn.VisualStudio.DiagnosticsWindow, Configuration: Debug Any CPU ------
3>Roslyn.VisualStudio.Setup.Dependencies -> D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.Setup.Dependencies\Debug\net472\Roslyn.VisualStudio.Setup.Dependencies.dll
4>BuildBoss -> D:\github\roslyn\artifacts\bin\BuildBoss\Debug\net472\BuildBoss.exe
17>Roslyn.VisualStudio.ServiceHub.Setup.x64 -> D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.ServiceHub.Setup.x64\Debug\net472\Roslyn.VisualStudio.ServiceHub.Setup.x64.dll
18>Roslyn.VisualStudio.ServiceHub.Setup.arm64 -> D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.ServiceHub.Setup.arm64\Debug\net472\Roslyn.VisualStudio.ServiceHub.Setup.arm64.dll
2>TestDiscoveryWorker -> D:\github\roslyn\artifacts\bin\TestDiscoveryWorker\Debug\net8.0\TestDiscoveryWorker.dll
2>TestDiscoveryWorker -> D:\github\roslyn\artifacts\bin\TestDiscoveryWorker\Debug\net472\TestDiscoveryWorker.exe
1>Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost\Debug\net6.0\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.dll
6>csc-arm64 -> D:\github\roslyn\artifacts\bin\csc-arm64\Debug\net472\csc.exe
9>VBCSCompiler -> D:\github\roslyn\artifacts\bin\VBCSCompiler\Debug\net472\VBCSCompiler.exe
7>StackDepthTest -> D:\github\roslyn\artifacts\bin\StackDepthTest\Debug\net472\StackDepthTest.exe
1>Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost\Debug\net472\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe
13>vbc -> D:\github\roslyn\artifacts\bin\vbc\Debug\net472\vbc.exe
20>------ Build started: Project: Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator, Configuration: Debug Any CPU ------
21>------ Build started: Project: AnalyzerRunner, Configuration: Debug Any CPU ------
22>------ Build started: Project: IdeBenchmarks, Configuration: Debug Any CPU ------
8>csc -> D:\github\roslyn\artifacts\bin\csc\Debug\net472\csc.exe
8>csc -> D:\github\roslyn\artifacts\bin\csc\Debug\net7.0\csc.dll
8>csc -> D:\github\roslyn\artifacts\bin\csc\Debug\net8.0\csc.dll
10>vbc-arm64 -> D:\github\roslyn\artifacts\bin\vbc-arm64\Debug\net472\vbc.exe
5>VBCSCompiler-arm64 -> D:\github\roslyn\artifacts\bin\VBCSCompiler-arm64\Debug\net472\VBCSCompiler.exe
12>BuildValidator -> D:\github\roslyn\artifacts\bin\BuildValidator\Debug\net472\BuildValidator.exe
12>BuildValidator -> D:\github\roslyn\artifacts\bin\BuildValidator\Debug\net8.0\BuildValidator.dll
9>VBCSCompiler -> D:\github\roslyn\artifacts\bin\VBCSCompiler\Debug\net7.0\VBCSCompiler.dll
9>VBCSCompiler -> D:\github\roslyn\artifacts\bin\VBCSCompiler\Debug\net8.0\VBCSCompiler.dll
14>vbi -> D:\github\roslyn\artifacts\bin\vbi\Debug\net7.0\vbi.dll
14>vbi -> D:\github\roslyn\artifacts\bin\vbi\Debug\net8.0\vbi.dll
14>vbi -> D:\github\roslyn\artifacts\bin\vbi\Debug\net472\vbi.exe
16>InteractiveHost32 -> D:\github\roslyn\artifacts\bin\InteractiveHost32\Debug\net472\InteractiveHost32.exe
3>Roslyn.VisualStudio.Setup.Dependencies -> D:\github\roslyn\artifacts\VSSetup\Debug\Roslyn.VisualStudio.Setup.Dependencies.vsix
11>csi -> D:\github\roslyn\artifacts\bin\csi\Debug\net7.0\csi.dll
11>csi -> D:\github\roslyn\artifacts\bin\csi\Debug\net472\csi.exe
11>csi -> D:\github\roslyn\artifacts\bin\csi\Debug\net8.0\csi.dll
13>vbc -> D:\github\roslyn\artifacts\bin\vbc\Debug\net8.0\vbc.dll
13>vbc -> D:\github\roslyn\artifacts\bin\vbc\Debug\net7.0\vbc.dll
15>InteractiveHost64 -> D:\github\roslyn\artifacts\bin\InteractiveHost64\Debug\net472\win-x64\InteractiveHost64.exe
15>InteractiveHost64 -> D:\github\roslyn\artifacts\bin\InteractiveHost64\Debug\net8.0-windows\win-x64\InteractiveHost64.dll
23>------ Build started: Project: Replay, Configuration: Debug Any CPU ------
24>------ Build started: Project: Roslyn.Compilers.Extension, Configuration: Debug Any CPU ------
19>Roslyn.VisualStudio.DiagnosticsWindow -> D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.DiagnosticsWindow\Debug\net472\Roslyn.VisualStudio.DiagnosticsWindow.dll
17>Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.x64 -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.x64\Debug\net8.0\Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.x64.dll
18>Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.arm64 -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.arm64\Debug\net8.0\Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.arm64.dll
20>Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator\Debug\net8.0\Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.dll
21>AnalyzerRunner -> D:\github\roslyn\artifacts\bin\AnalyzerRunner\Debug\net8.0\AnalyzerRunner.dll
17>Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.x64 -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.x64\Debug\net8.0\publish\
19>Roslyn.VisualStudio.DiagnosticsWindow -> D:\github\roslyn\artifacts\VSSetup\Debug\Roslyn.VisualStudio.DiagnosticsWindow.vsix
17>Roslyn.VisualStudio.ServiceHub.Setup.x64 -> D:\github\roslyn\artifacts\VSSetup\Debug\Roslyn.VisualStudio.ServiceHub.Setup.x64.vsix
WARNING: Potential build performance issue in 'Roslyn.VisualStudio.Setup.Dependencies.csproj'. The project does not appear up-to-date after a successful build: Input UpToDateCheckInput item 'D:\github\roslyn\artifacts\obj\Roslyn.VisualStudio.Setup.Dependencies\Debug\net472\Roslyn.VisualStudio.Setup.Dependencies.pkgdef' is newer (2024-06-25 14:07:34.120) than earliest output 'D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.Setup.Dependencies\Debug\net472\Roslyn.VisualStudio.Setup.Dependencies.xml' (2024-06-25 14:07:30.521), not up-to-date. See https://aka.ms/incremental-build-failure.
WARNING: Potential build performance issue in 'Roslyn.VisualStudio.DiagnosticsWindow.csproj'. The project does not appear up-to-date after a successful build: Input UpToDateCheckInput item 'D:\github\roslyn\artifacts\obj\Roslyn.VisualStudio.DiagnosticsWindow\Debug\net472\Roslyn.VisualStudio.DiagnosticsWindow.dll' is newer (2024-06-25 14:09:41.050) than earliest output 'D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.DiagnosticsWindow\Debug\net472\Roslyn.VisualStudio.DiagnosticsWindow.xml' (2024-06-25 14:09:41.018), not up-to-date. See https://aka.ms/incremental-build-failure.
20>Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator\Debug\net472\Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.exe
23>Replay -> D:\github\roslyn\artifacts\bin\Replay\Debug\net472\Replay.exe
24>Roslyn.Compilers.Extension -> D:\github\roslyn\artifacts\bin\Roslyn.Compilers.Extension\Debug\net472\Roslyn.Compilers.Extension.dll
24>Roslyn.Compilers.Extension -> D:\github\roslyn\artifacts\VSSetup\Debug\Roslyn.Compilers.Extension.vsix
WARNING: Potential build performance issue in 'Roslyn.VisualStudio.ServiceHub.Setup.x64.csproj'. The project does not appear up-to-date after a successful build: Input UpToDateCheckInput item 'D:\github\roslyn\artifacts\obj\Roslyn.VisualStudio.ServiceHub.Setup.x64\Debug\net472\Microsoft.VisualStudio.LanguageServices.AssetSynchronizationCore64.servicehub.service.json' is newer (2024-06-25 14:09:22.798) than earliest output 'D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.ServiceHub.Setup.x64\Debug\net472\Roslyn.VisualStudio.ServiceHub.Setup.x64.xml' (2024-06-25 14:09:22.229), not up-to-date. See https://aka.ms/incremental-build-failure.
25>------ Build started: Project: Roslyn.VisualStudio.Setup, Configuration: Debug Any CPU ------
23>Replay -> D:\github\roslyn\artifacts\bin\Replay\Debug\net8.0\Replay.dll
WARNING: Potential build performance issue in 'Roslyn.Compilers.Extension.csproj'. The project does not appear up-to-date after a successful build: Input UpToDateCheckInput item 'D:\github\roslyn\artifacts\obj\Roslyn.Compilers.Extension\Debug\net472\Roslyn.Compilers.Extension.dll' is newer (2024-06-25 14:09:15.924) than earliest output 'D:\github\roslyn\artifacts\bin\Roslyn.Compilers.Extension\Debug\net472\Roslyn.Compilers.Extension.xml' (2024-06-25 14:09:15.912), not up-to-date. See https://aka.ms/incremental-build-failure.
18>Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.arm64 -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Remote.ServiceHub.CoreComponents.arm64\Debug\net8.0\publish\
18>Roslyn.VisualStudio.ServiceHub.Setup.arm64 -> D:\github\roslyn\artifacts\VSSetup\Debug\Roslyn.VisualStudio.ServiceHub.Setup.arm64.vsix
WARNING: Potential build performance issue in 'Roslyn.VisualStudio.ServiceHub.Setup.arm64.csproj'. The project does not appear up-to-date after a successful build: Input UpToDateCheckInput item 'D:\github\roslyn\artifacts\obj\Roslyn.VisualStudio.ServiceHub.Setup.arm64\Debug\net472\Microsoft.VisualStudio.LanguageServices.AssetSynchronizationCore64.servicehub.service.json' is newer (2024-06-25 14:09:20.475) than earliest output 'D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.ServiceHub.Setup.arm64\Debug\net472\Roslyn.VisualStudio.ServiceHub.Setup.arm64.xml' (2024-06-25 14:09:20.104), not up-to-date. See https://aka.ms/incremental-build-failure.
21>AnalyzerRunner -> D:\github\roslyn\artifacts\bin\AnalyzerRunner\Debug\net472\AnalyzerRunner.exe
22>IdeBenchmarks -> D:\github\roslyn\artifacts\bin\IdeBenchmarks\Debug\net472\IdeBenchmarks.exe
26>------ Build started: Project: IdeCoreBenchmarks, Configuration: Debug Any CPU ------
25>Roslyn.VisualStudio.Setup -> D:\github\roslyn\artifacts\bin\Roslyn.VisualStudio.Setup\Debug\net472\Roslyn.VisualStudio.Setup.dll
26>IdeCoreBenchmarks -> D:\github\roslyn\artifacts\bin\IdeCoreBenchmarks\Debug\net472\IdeCoreBenchmarks.exe
26>IdeCoreBenchmarks -> D:\github\roslyn\artifacts\bin\IdeCoreBenchmarks\Debug\net8.0\IdeCoreBenchmarks.dll
25>InteractiveHost64 -> D:\github\roslyn\artifacts\bin\InteractiveHost64\Debug\net8.0-windows\win-x64\publish\
25>C:\Program Files\dotnet\sdk\9.0.100-preview.5.24307.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(355,5): error MSB3030: Could not copy the file "D:\github\roslyn\artifacts\obj\InteractiveHost64\Debug\net472\win-x64\InteractiveHost64.exe.config" because it was not found.
25>Done building project "InteractiveHost64.csproj" -- FAILED.
27>------ Build started: Project: ExpressionEvaluatorPackage, Configuration: Debug Any CPU ------
28>------ Build started: Project: RoslynDeployment, Configuration: Debug Any CPU ------
29>------ Build started: Project: Microsoft.VisualStudio.IntegrationTest.Setup, Configuration: Debug Any CPU ------
30>------ Build started: Project: IntegrationTestBuildProject, Configuration: Debug Any CPU ------
30>PrepareTests -> D:\github\roslyn\artifacts\bin\PrepareTests\Debug\net8.0\PrepareTests.dll
30>RunTests -> D:\github\roslyn\artifacts\bin\RunTests\Debug\net8.0\RunTests.dll
30>VisualStudio.SetupPackage -> D:\github\roslyn\artifacts\obj\Microsoft.CodeAnalysis.Compilers.Setup.x64\Debug\net472\Microsoft.CodeAnalysis.Compilers.x64.vsix
30>VisualStudio.SetupPackage -> D:\github\roslyn\artifacts\obj\Microsoft.CodeAnalysis.Compilers.Setup.x86\Debug\net472\Microsoft.CodeAnalysis.Compilers.x86.vsix
30>Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests\Debug\net8.0\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.dll
30>VisualStudio.SetupPackage -> D:\github\roslyn\artifacts\obj\Microsoft.CodeAnalysis.Compilers.Setup.arm64\Debug\net472\Microsoft.CodeAnalysis.Compilers.arm64.vsix
30>Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests -> D:\github\roslyn\artifacts\bin\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests\Debug\net472\Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests.dll
========== Build: 25 succeeded, 5 failed, 177 up-to-date, 0 skipped ==========
========== Build completed at 2:11 PM and took 22.665 seconds ==========
RikkiGibson commented 1 month ago

sounds like this might be related to dotnet/sdk#39701 per @jjonescz

jjonescz commented 1 month ago

sounds like this might be related to https://github.com/dotnet/sdk/pull/39701

This looks like a different issue; I see only this one error in the output:

C:\Program Files\dotnet\sdk\9.0.100-preview.5.24307.3\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Publish.targets(355,5): error MSB3030: Could not copy the file "D:\github\roslyn\artifacts\obj\InteractiveHost64\Debug\net472\win-x64\InteractiveHost64.exe.config" because it was not found.