Skip to content

Conversation

@philnach
Copy link
Collaborator

This change Fixes #163 by switching from exec dotnet to using msbuild.

Root cause:
The custom target in the projects: dotnet publish --configuration $(Configuration) --no-build -p:PublishProfile=FolderProfile"

  • msbuild(1) spawns process -> dotnet (2) spawns process -> publish (3)
  • (2) process exits
  • But (3) process still has the output/error pipe open (even though it might not be actively writing)
    WaitForExit on MSBuild side is waiting for this pipe to close and app hangs

A better analysis is provided here and why it is problematic:
Process.WaitForExit() hangs forever even though the process has exited in some cases · Issue #29232 · dotnet/runtime

Fix:
Switch to using msbuild vs. exec dotnet

How validated:

  1. Build succeeds locally
  2. Ran Validate all .NET projects and confirmed successful output: https://github.com/philnach/data-migration-desktop-tool/actions/runs/12909585465

@markjbrown
Copy link
Collaborator

@philnach and @bowencode is this good to go?

@bowencode bowencode merged commit 79f9d93 into AzureCosmosDB:main Feb 23, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build hangs when building from Visual Studio

3 participants