Azure-functions-core-tools: VS 2017 is not upgrading functions CLI

Created on 5 Sep 2018  路  11Comments  路  Source: Azure/azure-functions-core-tools

(VS 2017 15.7.5)
(VS "Azure Functions and Web Jobs Tools" extension 15.10.2009.0)

When I launch my project in debug VS, it begins downloading "Azure Functions CLI 1.3.0". I see network traffic but I'm not sure where it's saved. %LOCALAPPDATA%\AzureFunctionsTools\Releases\1.3.0 exists but remains empty.

The project actually launches in CLI 1.0.10, from %LOCALAPPDATA%\AzureFunctionsTools\Releases\1.0.10

This is a Functions 1.x project, which CLI release should I be using? (1.0.12?)

Also, how do I stop it downloading 1.3.0 over and over?

Most helpful comment

@ishepherd and @raymondb1, Looks like the download is not happening cleanly for you guys.
To mitigate this issue:

  1. Close all instances of VS
  2. Delete this folder %LOCALAPPDATA%\AzureFunctionsTools
  3. Delete %USERPROFILE%\.templateengine
  4. Open Visual Studio -> File -> New Project -> Select Azure Functions -> You should see loading at the bottom
    image
  5. Wait for it to finish, Open your existing project.

@ishepherd, After this it should not download 1.3.0 over and over again.

All 11 comments

Having the same issue with 2.5.1 . VS attempts to install the new version of the CLI, Creates the folder but does not add anything to it.

When the functions spin up eventually they point to the 2.3.2 folder and I get this error:

8 3:04:17 PM] A ScriptHost error has occurred [9/5/2018 3:04:17 PM] System.Private.CoreLib: No parameterless constructor defined for this object. [9/5/2018 3:04:17 PM] Stopping Host Function host is not running.

Any way to install the later versions of the CLI manually (Since I assume it just looks in the latest folder with func.exe?)

@soninaren Can you take a look

@ishepherd and @raymondb1, Looks like the download is not happening cleanly for you guys.
To mitigate this issue:

  1. Close all instances of VS
  2. Delete this folder %LOCALAPPDATA%\AzureFunctionsTools
  3. Delete %USERPROFILE%\.templateengine
  4. Open Visual Studio -> File -> New Project -> Select Azure Functions -> You should see loading at the bottom
    image
  5. Wait for it to finish, Open your existing project.

@ishepherd, After this it should not download 1.3.0 over and over again.

Looks like ultimately the release of 2.5.2 allowed me to locally debug a couple days ago. Testing this today (without performing the steps, just trying to verify I still had the issue) got me 2.6.0 cleanly and into the right folders.

Thanks for following up though.

@soninaren Thanks

Making sure all templates are up to date...

this stage never completes.
It has created,

%LOCALAPPDATA%\AzureFunctionsTools\Releases
    \1.0.10
    \1.0.11   << Empty
    \1.3.0   << Empty
    \2.0.1-beta.25
    \2.0.1-beta.26   << Empty

Please allow a couple of days and I will retest this process on a different internet connection, I have my doubts about my home connection.

@soninaren Met same problem before. Downloading may fail due to network problem and falls back to use 1.0.10 and 2.0.1-beta.25 shipped with VS extension. Could the cli shipped with extension be updated, so that when some of us met network issue, we can still leverage cli which is not so old?

@JohnReeson, yes i will follow up with the VS team to make sure an updated version of cli is shipped with next version of VS extension. Will also follow up to see if we can sort out the download issue.

You can get the contents of Azure Functions Tools folder here: https://funcstore01.blob.core.windows.net/download/AzureFunctionsTools.zip

Make sure you delete the %USERPROFILE%\.templateengine folder before you start VS.

@soninaren @JohnReeson I repeated those steps today, on a better network connection. Works now and my project launches in 1.3.0.

This is a very "unusual" way to surface a network problem :) So yes please look at it.


Releases dir now looks like

%LOCALAPPDATA%\AzureFunctionsTools\Releases
    \1.0.11
    \1.3.0
    \2.0.1-beta.26
    \2.8.0

Issue can be closed. Duplicate of this closed one.

One takeaway for me https://github.com/Azure/azure-functions-core-tools/issues/694#issuecomment-423373064, is that if downloads are failing that needs to be surfaced to the user.

@ishepherd this is definitely something we are tracking and would make improvements to . We have done some work to reduce the download size and have a wiki page to help resolve the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

buragc picture buragc  路  6Comments

AssassinTee picture AssassinTee  路  3Comments

solvingj picture solvingj  路  5Comments

brandonh-msft picture brandonh-msft  路  4Comments

lastcoolnameleft picture lastcoolnameleft  路  4Comments