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

[Xamarin.Android.Build.Tasks] move Console.WriteLine() messages to MSBuild log #9359

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

jonathanpeppers
Copy link
Member

When running builds at the command-line (with the default, new "MSBuild Terminal Logger"), Console.WriteLine() output can make the text not look so great:

> dotnet build -c Release -bl
Restore complete (0.6s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
hellomaui                                                                                      _BuildApkEmbed (18.9s)
Number of descriptors: 116; index entries: 232
hellomaui succeeded (33.3s) → bin\Release\net9.0-android\android-arm64\hellomaui.dll
Build succeeded in 46.8s

The message Number of descriptors: 116; index entries: 232 appears, but so does another one. You can watch the terminal logger clear and rewrite messages, which is not ideal.

Let's move these to the MSBuild logger, so they will show up in .binlog files, but not in the console output.

…MSBuild log

When running builds at the command-line (with the default, new
"MSBuild Terminal Logger"), `Console.WriteLine()` output can make the
text not look so great:

    > dotnet build -c Release -bl
    Restore complete (0.6s)
    You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
    hellomaui                                                                                      _BuildApkEmbed (18.9s)
    Number of descriptors: 116; index entries: 232
    hellomaui succeeded (33.3s) → bin\Release\net9.0-android\android-arm64\hellomaui.dll
    Build succeeded in 46.8s

The message `Number of descriptors: 116; index entries: 232` appears,
but so does another one. You can watch the terminal logger clear and
rewrite messages, which is not ideal.

Let's move these to the MSBuild logger, so they will show up in
`.binlog` files, but not in the console output.
@jonpryor jonpryor merged commit 5f58b76 into main Oct 2, 2024
20 of 58 checks passed
@jonpryor jonpryor deleted the dev/peppers/cwl branch October 2, 2024 14:34
jonathanpeppers added a commit that referenced this pull request Oct 2, 2024
…MSBuild log (#9359)

When running builds at the command-line (with the default, new
"MSBuild Terminal Logger"), `Console.WriteLine()` output can make the
text not look so great:

	> dotnet build -c Release -bl
	Restore complete (0.6s)
	You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
	hellomaui                                                                                      _BuildApkEmbed (18.9s)
	Number of descriptors: 116; index entries: 232
	hellomaui succeeded (33.3s) → bin\Release\net9.0-android\android-arm64\hellomaui.dll
	Build succeeded in 46.8s

The message `Number of descriptors: 116; index entries: 232` appears,
but so does another one.  You can watch the terminal logger clear and
rewrite messages, which is not ideal.

Let's move these to the MSBuild logger, so they will show up in
`.binlog` files, but not in the console output.
@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants