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

Building PublishProfile=DefaultContainer doesn't show output indicating a container image gets built. [.NET 9] #44837

Open
tmds opened this issue Nov 13, 2024 · 2 comments
Labels
Area-NetSDK untriaged Request triage from a team member

Comments

@tmds
Copy link
Member

tmds commented Nov 13, 2024

Output after building a container image:

❯ dotnet publish  /p:PublishProfile=DefaultContainer
Restore complete (1.6s)
  web succeeded (9.0s) → bin/Release/net9.0/publish/

Build succeeded in 11.8s

The output is exactly the same as when building the project as a (non-container) .NET app:

❯ dotnet publish 
Restore complete (1.6s)
  web succeeded (1.3s) → bin/Release/net9.0/publish/

Build succeeded in 4.2s

During the build, the PublishContainer show up. That is indicative of the container image being built. Once the build is finished, that message was overwritten.

With .NET 8, the base image and image being built are both shown on the terminal:

❯ dotnet publish  /p:PublishProfile=DefaultContainer
MSBuild version 17.8.5+b5265ef37 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  web -> /tmp/web/bin/Release/net8.0/web.dll
  web -> /tmp/web/bin/Release/net8.0/publish/
  Building image 'web' with tags 'latest' on top of base image 'mcr.microsoft.com/dotnet/aspnet:8.0'.
  Pushed image 'web:latest' to local registry via 'podman'.

cc @baronfel

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-NetSDK untriaged Request triage from a team member labels Nov 13, 2024
@baronfel
Copy link
Member

This is an expected side effect of the change to using Terminal Logger by default on .NET 9. The short term fix is to disable TL with -tl:off, but longer term TL needs to learn about:

  • Intermediate progress reporting
  • Reporting final outputs other than DLLs

Both of which we're tracking over at dotnet/msbuild.

@tmds
Copy link
Member Author

tmds commented Nov 13, 2024

Sounds like this is being addressed. Feel free to close the issue, or keep it open for visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

2 participants