azure-functions-templates icon indicating copy to clipboard operation
azure-functions-templates copied to clipboard

Function can't load dependencies

Open aggieben opened this issue 4 years ago • 2 comments

I tried creating / running an F♯ TimerTrigger function using the instructions here: https://github.com/Azure/azure-functions-templates/wiki/Using-the-templates-directly-via-dotnet-new

When I try invoking func --script-root bin\Debug\netcoreapp3.1, the result is as follows: image

For the indexers:

System.Private.CoreLib: Could not load file or assembly 'Microsoft.Extensions.Logging.Abstractions, Version=3.1.3.0, Culture=neutral, PublicKeyTo
ken=adb9793829ddae60'.

aggieben avatar Apr 28 '20 19:04 aggieben

Hmm; after digging around here: https://docs.microsoft.com/en-us/azure/azure-functions/functions-versions#migrating-from-2x-to-3x it seems I should have been using the v3 tooling, which was only available via chocolatey by specifying the version number, like this:

choco install azure-functions-core-tools-3 --version 3.0.2358 --params "'/x64'"

This is the required syntax to install a package that is still in chocolatey moderation; there are no published v3 packages.

Once this was installed, I tried just func start in my project directory, but now it fails to copy the host.json file:

image

aggieben avatar Apr 28 '20 19:04 aggieben

Hey @aggieben it seems like this issue is being tracked through the issues listed below, okay to close this one?

  • https://github.com/Azure/azure-functions-core-tools/issues/1963
  • https://github.com/Azure/azure-functions-templates/issues/1096

liliankasem avatar Dec 13 '21 12:12 liliankasem