Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 18, 2025

Backport of #47064 to release/9.0.3xx

Description

This PR is a small change to the Containers targets that defaults containerization to enabled for console applications. This support has been separately enabled for Web and Worker targets, but we never took the step of doing this for console apps

Regarding why we didn't do this earlier the reason was: back when we were initially doing these defaults, the primary way to publish a container was via a Publish Profile - which required the project to import a set of logic and Tasks called the 'Publish SDK'. Web and Worker SDK projects do this already, so they lit up container support easily. However, Console projects couldn't import the Publish SDK easily because of MSBuild ordering/layering constraints.

Customer Impact

Customers can call /t:PublishContainer for all executable .NET applications. dotnet new console && dotnet publish /t:PublishContainer Just Works. We've released this in 10p3 and feedback has been positive already!

Regression?

Nope, this was just a gap in our coverage.

Risk

Small - this just changes the default of a property that triggers the container support.

Tests

Tests were added to cover the new + publish workflow for console apps too.

@github-actions github-actions bot requested a review from a team as a code owner March 18, 2025 14:24
@ghost ghost added Area-Infrastructure untriaged Request triage from a team member labels Mar 18, 2025
@baronfel baronfel enabled auto-merge (squash) March 18, 2025 14:39
@baronfel
Copy link
Member

/azp run dotnet-sdk-public-ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MiYanni
Copy link
Member

MiYanni commented Apr 14, 2025

/azp run dotnet-sdk-public-ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@marcpopMSFT
Copy link
Member

@baronfel , if you still want this in 3xx, it'll need tactics approval.

@baronfel
Copy link
Member

That's frustrating. This has been setting for weeks in CI instability it seems.

@baronfel baronfel self-assigned this Apr 15, 2025
@Forgind
Copy link
Contributor

Forgind commented Apr 15, 2025

That's frustrating. This has been setting for weeks in CI instability it seems.

Are you sure it's just CI instability? I looked at the failure, and it didn't look how I'd expect:

warning NETSDK1198: A publish profile with the name 'DefaultContainer' was not found in the project. Set the PublishProfile property to a valid file name.

@baronfel
Copy link
Member

Yeah, you're right - I took a look at it earlier today and it did seem to be a Real Thing ™️. Which is confusing because main didn't have any problems. I'm tinkering a bit in between other tasks, and if I can get it green I'll send something to Tactics.

@baronfel
Copy link
Member

Huzzah, green! Will update with tactics template and send email.

@baronfel baronfel merged commit 5f32ae2 into release/9.0.3xx Apr 18, 2025
30 checks passed
@baronfel baronfel deleted the backport/pr-47064-to-release/9.0.3xx branch April 18, 2025 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants