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

Prevent reading from .rsp file for worker nodes #11170

Conversation

YuliiaKovalova
Copy link
Member

Context

Sometimes Windows Defender blocks on MSBuild.rsp file reading operation (e.g. https://dev.azure.com/devdiv/DevDiv/_workitems/edit/2308633).
Since response file content isn't needed for worker nodes, we can skip reading from t.

Changes Made

Add a check for nodemode: arg in command like

Testing

Local testing when rsp file is manually locked.

src/MSBuild/XMake.cs Outdated Show resolved Hide resolved
@jeffkl
Copy link
Contributor

jeffkl commented Dec 18, 2024

Rather than hard code the argument parsing logic to ignore one thing if another is specified, perhaps it would better to just specify the /noautoresponse command-line argument when spawning the worker node?

string commandLineArgs = $"/nologo /nodemode:1 /nodeReuse:{ComponentHost.BuildParameters.EnableNodeReuse.ToString().ToLower()} /low:{ComponentHost.BuildParameters.LowPriority.ToString().ToLower()}";

@YuliiaKovalova
Copy link
Member Author

Rather than hard code the argument parsing logic to ignore one thing if another is specified, perhaps it would better to just specify the /noautoresponse command-line argument when spawning the worker node?

string commandLineArgs = $"/nologo /nodemode:1 /nodeReuse:{ComponentHost.BuildParameters.EnableNodeReuse.ToString().ToLower()} /low:{ComponentHost.BuildParameters.LowPriority.ToString().ToLower()}";

Thank you for the nice tip! I haven't known about this switch before.

@YuliiaKovalova YuliiaKovalova self-assigned this Jan 2, 2025
@YuliiaKovalova YuliiaKovalova merged commit 91d5e15 into dotnet:main Jan 2, 2025
10 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.

4 participants