dotnet / sdk-container-builds

Libraries and build tooling to create container images from .NET projects using MSBuild
https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container
MIT License
179 stars 34 forks source link

How to specify /t:PublishContainer in pubxml? #519

Closed Code-DJ closed 10 months ago

Code-DJ commented 10 months ago

Is it possible to specify /t:PublishContainer in a pubxml file? That way we can run:

dotnet publish /p:PublishProfile=MyContainerProfile.pubxml
baronfel commented 10 months ago

Unfortunately this isn't possible - pubxml files only contain MSBuild properties and cannot influence what target will be run.