Azure / Azure-Functions

1.1k stars 191 forks source link

Unable to update the Functions Extensions Version #1595

Open tnlthanzeel opened 4 years ago

tnlthanzeel commented 4 years ago

hi, im have been deploying azure functions from visual studio 2019 for a long time. but today im having an issue after publishing from visual studio. i updated the visual studio this morning to version 16.6.0.

the issue is

Unable to update the Functions Extensions Version in Azure Application Settings because you may not be signed into Visual Studio with the appropriate Azure subscription. See https://go.microsoft.com/fwlink/?LinkId=2071272&CLCID=0x1033 for more information.

codermrrob commented 4 years ago

Same issue - never any problem publishing Azure Functions but this morning :

Unable to update the Functions Extensions Version in Azure Application Settings because you may not be signed into Visual Studio with the appropriate Azure subscription.

I am signed in, of course, with my company account. To get around this error I had to sign in with VS using my clients Azure account.

I never before had to sign into VS with my clients Azure account credentials in order to publish to a clients subscription. Then after publishing I must sign in with my company account again to continue working.

I already provided credentials in the publish profile, and never before needed to change credentials in order to publish. Why now?

tnlthanzeel commented 4 years ago

any update on this issue?

lpperras commented 3 years ago

I have the same issue when importing a publishing profile, even if this profile is from the Azure subscription I'm logged in in VS. I tried logging out many times.

I can also see everything in the cloud explorer.

razdavidovich commented 3 years ago

I have the same issue with latest VS2019

v-bbalaiagar commented 3 years ago

Hi @razdavidovich, Apologies for the delayed response, the issue was somehow lost in the trace. We will check for the possibilities internally and update you with the findings.

vijayrkn commented 3 years ago

The reason you are seeing this error is because VS does the following 2 things as part of the publish process:

  1. Push the required deployment artifacts to the target destination (Azure in this case). This does not need the user id to be logged into VS since the publishing creds are all we need to push the artifacts.
  2. Set the required app settings correctly on the Azure functions instance. This requires the userid to be logged in that contains access to the Azure resource where the artifacts are pushed to.

If you are manually handling step (2), then you can set the following msbuild property in the csproj to bypass step(2).

<PropertyGroup>
<DisableFunctionExtensionVersionUpdate>true</DisableFunctionExtensionVersionUpdate>
</PropertyGroup>

If you are setting this property, please make sure that the Functions instance is correctly updated with all the required settings for the app to run successfully.

Hope this helps.

v-bbalaiagar commented 2 years ago

Hi @razdavidovich / @lpperras , Let us know if the above information resolves your query, or if you have any further queries.

Bengkel commented 2 years ago

Same issue here. Above information does not resolve the issue.

v-bbalaiagar commented 2 years ago

Tagging @vijayrkn , for further inputs

warpdriv commented 2 years ago

Just started with me too. VS 2022 (community), trying to publish a v4 function. I used the profile from the portal. No luck.

papadeltasierra commented 1 year ago

Hitting this with latest VS 2022, v17.3.2

sengiv commented 1 year ago

The reason you are seeing this error is because VS does the following 2 things as part of the publish process:

  1. Push the required deployment artifacts to the target destination (Azure in this case). This does not need the user id to be logged into VS since the publishing creds are all we need to push the artifacts.
  2. Set the required app settings correctly on the Azure functions instance. This requires the userid to be logged in that contains access to the Azure resource where the artifacts are pushed to.

If you are manually handling step (2), then you can set the following msbuild property in the csproj to bypass step(2).

<PropertyGroup>
<DisableFunctionExtensionVersionUpdate>true</DisableFunctionExtensionVersionUpdate>
</PropertyGroup>

If you are setting this property, please make sure that the Functions instance is correctly updated with all the required settings for the app to run successfully.

Hope this helps.

@vijayrkn nice & simple solution This has been tested working in VS 17.4.0 Preview 3.0

Another temporary hack that worked, was sign out of Visual Studio, and sign in back, works for awhile.

hariharan228 commented 1 year ago

I faced the same issue while using VS2022. None of the above solutions worked for me. Later I found out that my azure account has been logged out while creating a new publish profile. After reentering the credentials that error text was gone.

lwyj123 commented 1 year ago

Solution

After "re-enter your credentials" in Visual Studio account setting. I solve the problem.

techroad-dev commented 1 year ago

Thanks @lwyj123 - After re-entering the credentials, it works for me too :)

nalinjax commented 3 months ago

I came across this error message with VS2022. It turns-out that me enabling two-factor-authentication for the registered account triggered this. So, I had to refresh the credentials in VS and provider the 2nd-factor authentication code to verify the Azure account connection. That solved it.

warpdriv commented 3 months ago

@vijayrkn, you mention another frustrating problem with VS 2022. I sign in and I'm doing my work through the day and for some reason, I have to sign in again. The only true way to make this work is to sign out, close VS, open VS, and sign in. This happens on VS community and Enterprise.

grishmadoshi commented 2 months ago

Faced same issue for publish from VS2002. I had created publish profile and first time it updated azure function version. After I updated my project it would publish but didn't update azure function version to V4. I deleted publish profile and re-created and it worked.