Visual Studio failed to publish to Azure Container Registry

Pampua84 1 Reputation point
2025-01-21T15:33:13.06+00:00

Hi,

I have an ASP.NET Core application that I am trying to migrate to Azure. I am using Azure Container Registry to publish my app's images and run it on Container App. Until a few days ago, I was able to successfully push the image to the container registry using Visual Studio's 'Publish Tool'. However, recently, the publication has stopped working: I always get a message saying the publication was successful, but I can't find any published image.

I increased the log level in Visual Studio and consistently see the following error:

CONTAINER1013: Failed to push to the output registry: CONTAINER1008: Failed retrieving credentials for "containerregistryname.azurecr.io": Docker config file doesn't exist.

Unfortunately, for various reasons, I cannot use Docker Desktop on my machine, so I was relying on Visual Studio for publishing. I also checked the logs on Azure Container Registry, but there is nothing related to these failed publication attempts.

Could you please help me? Thank you.

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
478 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,756 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,238 questions
{count} votes

1 answer

Sort by: Most helpful
  1. hossein jalilian 9,700 Reputation points
    2025-01-21T18:14:27.3266667+00:00

    Hello Pampua84,

    Thanks for posting your question in the Microsoft Q&A forum.

    It is likely related to authentication problems.

    Open a command prompt and run az login to ensure you're authenticated with Azure, and run az acr login --name <your-registry-name> to authenticate with your ACR.

    Ensure that the admin user is enabled for your ACR. You can do this in the Azure portal under your ACR's Access keys section, If admin user is disabled, enable it temporarily for testing purposes.

    Update the registry credentials with the admin username and password from the ACR Access keys section


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.