Visual Studio 2019 Azure KeyVault configuration error when publish

Enrico Rossini 176 Reputation points
2020-10-07T16:58:47.947+00:00

I want to deploy my project to Azure in an App Service I have just created. Also, I created a KeyVault for all my settings.

When I try to deploy to app to the service, I have to configure the connection strings for the databases.

2R1Yo.png

I click on Configure and follow the instruction and select the right app service or KeyVault. Then, in the last step, I receive this error.

> Dependency configuration progress
>
> Failed to resolve token 'ProfileResourceId'.
>
> ErrorEmpty parameter 'resourceId'...
>
> ErrorFailed to configure Azure AppService settings.
>
> Failed to configure dependency Azure Key Vault secrets1

TGzb5.png

How can I fix it?

More details

I didn't follow any documentation. Usually, I use Azure DevOps to deploy application to Azure. In this case, I prefer to deploy the application from my laptop.

For that, I downloaded the publish profile from the portal and added in Visual Studio.

30808-image.png

Then, I see some alert. At the beginning I ignored the alert but the deployed application doesn't work. So, I tried to configure each dependence.

30885-image.png

If I press on the + to add a new service dependency, I select Azure Key Vault. Select the Azure subscription and the keyvault. Then, the local variable and review the setting. Then Finish.

30839-image.png

30852-image.png

30845-image.png

30719-image.png

In the solution I see some files for ServiceDependencies

30815-image.png

What it is strange to me is that in the project I successful configured the Connected Services.

30924-image.png

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,131 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,938 questions
{count} votes