Open amammes opened 5 months ago
I don't believe there is any way to handle this currently in csproj, pubxml, and/or Dockerfile. I would recommend to log a suggestion for this at https://developercommunity.visualstudio.com/VisualStudio/suggest and it will get routed to the team that owns Publish.
Is there a way to do this directly from csproj, pubxml, and/or Dockerfile?
That suggestion page does not work. Whatever I do, after clicking submit it says "Unexpected error" "Sign-in required. Please sign-in again and retry.". But I AM signed in with my Microsoft account. I tried from Chrome, Chrome incognito and Edge, all fail the same way
Unfortanate timing, I think there may have been an outage. Feel free to try again later, however I opened a suggestion directly on the internal backlog with a link to this.
@amammes I did some digging: while the publish experience in VS does not have support for this, if you are willing to use the new container image publish feature in the .NET SDK they do provide a property for specifying multiple image tags ContainerImageTags.
Note: Support for debugging SDK published containers is only in 17.9+ which is still in Preview.
Note2: I tested how our debugging support handles the ContainerImageTags
property and found it caused a conflict. but you can work-around it with a condition:
<ContainerImageTags Condition="'$(ContainerImageTag)' == ''">tag1;tag2</ContainerImageTags>
My app is C# Asp.Net 8.0.1 - VS2022 Version 17.9.0 Preview 3.0.
I would like to publish my image with multiple tags using a single pubxml, for example:
Among several tests, I tried putting this in the pubxml, but only the last tag is used.
I believe this requires calling docker tag and docker push in a loop, once for each tag. Been trying to figure out a way to do this for a couple of days. Is there a way to do this directly from csproj, pubxml, and/or Dockerfile? Thanks