-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
light up container publish for all Exe/WinExe projects by default #47064
base: main
Are you sure you want to change the base?
light up container publish for all Exe/WinExe projects by default #47064
Conversation
Test failures seem to be an issue with |
Drive-by review: when first adopting the publish container workflow, I believe a couple of apps forgot to enable this flag and instead (if I recall correctly) got the older Dockerfile-based tooling (i.e. https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/docker/visual-studio-tools-for-docker?view=aspnetcore-9.0) where you can F5 debug inside the container. I bring it up just as a reminder of that older tooling and to make sure this change doesn't make things ambiguous. Happy to do more research if needed; sorry this is somewhat vague. |
Good call-out - I believe at this time both VS and VS Code support f5 debugging for the SDK tech, and that is predicated on checking for both this flag and the 'ProjectCapability' that we add to the project as ambient information. cc @danegsta for heads-up |
Thanks for the heads up! I’ll bring this up in our team’s standup today so we can double check our detection logic (and the logic we use to special case publish for console, etc.). Would this change potentially get back ported to servicing releases for earlier SDKs? |
Depending on the speed of review we might be able to get it into 9.0.300, but maybe not further back. |
#47047 highlighted the issue that we've had for a long time in Containers that Console apps have to do a gesture to get containerization support. It's a very common user stumbling point. Let's see what happens if we light it up for those project types.
Regarding why we didn't do this earlier, I think I remember what the reason was: back when we were 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.
Now that we've mostly moved off of PublishProfile-based support and onto 'normal' MSBuild Target invocation (
-t:PublishContainer
), it should be safer to toggleEnableSdkContainerSupport
based on theOutputType
of the project.