Remove outdated logging + fix the test#12607
Merged
YuliiaKovalova merged 3 commits intomainfrom Oct 6, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes outdated process tracking code and fixes a test that was experiencing unhandled exceptions. The main purpose is to clean up debugging infrastructure that is no longer needed after a previous fix and address test failures caused by improper process lifecycle management.
- Removes the entire ProcessTracker helper class and its usage from test methods
- Simplifies test execution by removing try/catch blocks that were masking the real issue
- Updates the build execution pattern to use BuildManager with proper parameters
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
MichalPavlik
approved these changes
Oct 6, 2025
This was referenced Feb 23, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is related to the fix https://github.com/dotnet/msbuild/pull/12416/files -
ProcessTrackershouldn't be needed now.It wasn't visible due to try/catch and while I was investigating the failure, I realized the gap.
Unhandled exception. System.InvalidOperationException: Process was not started by this object, so requested information cannot be determined. at System.Diagnostics.Process.EnsureState(State state) at System.Diagnostics.Process.get_ExitCode() at Microsoft.Build.Engine.UnitTests.BackEnd.TaskHostFactory_Tests.ProcessTracker.<>c__DisplayClass1_1.<AttachToProcess>b__0(Object sender, EventArgs e) in /home/vsts/work/1/s/src/Build.UnitTests/BackEnd/TaskHostFactory_Tests.cs:line 366 at System.Diagnostics.Process.RaiseOnExited() at System.Diagnostics.Process.CompletionCallback(Object waitHandleContext, Boolean wasSignaled) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.CompleteWaitThreadPoolWorkItem.System.Threading.IThreadPoolWorkItem.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() at System.Threading.Thread.StartCallback()