Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet format is constantly failing on CI #3841

Open
Kielek opened this issue Dec 2, 2024 · 2 comments
Open

dotnet format is constantly failing on CI #3841

Kielek opened this issue Dec 2, 2024 · 2 comments
Milestone

Comments

@Kielek
Copy link
Contributor

Kielek commented Dec 2, 2024

dotnet format .\OpenTelemetry.AutoInstrumentation.sln --no-restore --verify-no-changes
  dotnet format .\OpenTelemetry.AutoInstrumentation.sln --no-restore --verify-no-changes
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    DOTNET_ROOT: C:\Program Files\dotnet
Unhandled exception: System.Exception: The build host could not be found at 'C:\Program Files\dotnet\sdk\9.0.100\DotnetTools\dotnet-format\BuildHost-net47[2](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/actions/runs/12113589586/job/33768778492?pr=3840#step:4:2)\Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe'
   at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.AssertBuildHostExists(String buildHostPath)
   at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.GetDotNetFrameworkBuildHostPath()
   at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.CreateDotNetFrameworkBuildHostStartInfo()
   at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.GetBuildHostAsync(BuildHostProcessKind buildHostKind, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.BuildHostProcessManager.GetBuildHostWithFallbackAsync(BuildHostProcessKind buildHostKind, String projectOrSolutionFilePath, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectFileInfosAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadProjectInfosFromPathAsync(String projectPath, DiagnosticReportingOptions reportingOptions, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadAsync(CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(String solutionFilePath, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadSolutionInfoAsync(String solutionFilePath, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenSolutionAsync(String solutionFilePath, ILogger msbuildLogger, IProgress`1 progress, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.Workspaces.MSBuildWorkspaceLoader.LoadAsync(String solutionOrProjectPath, WorkspaceType workspaceType, String binaryLogPath, Boolean logWorkspaceWarnings, ILogger logger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.OpenMSBuildWorkspaceAsync(String solutionOrProjectPath, WorkspaceType workspaceType, Boolean noRestore, Boolean requiresSemantics, String binaryLogPath, Boolean logWorkspaceWarnings, ILogger logger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.CodeFormatter.FormatWorkspaceAsync(FormatOptions formatOptions, ILogger logger, CancellationToken cancellationToken, String binaryLogPath)
   at Microsoft.CodeAnalysis.Tools.FormatCommandCommon.FormatAsync(FormatOptions formatOptions, ILogger`1 logger, CancellationToken cancellationToken)
   at Microsoft.CodeAnalysis.Tools.Commands.RootFormatCommand.FormatCommandDefaultHandler.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
   at System.CommandLine.Invocation.InvocationPipeline.InvokeAsync(ParseResult parseResult, CancellationToken cancellationToken)
@Kielek
Copy link
Contributor Author

Kielek commented Dec 2, 2024

It can be reproduced locally on my machine. I have checked, the mentioned exe file is not available, but Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost.exe.config is available in the folder.

Similar issues found on GH: dotnet/sdk#44893, dotnet/sdk#43017

@Kielek
Copy link
Contributor Author

Kielek commented Dec 4, 2024

Blocked by dotnet/sdk#45291. It should be included within one of the next .NET9 releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants