Azure / azure-functions-templates

Azure functions templates for the azure portal, CLI, and VS
MIT License
350 stars 197 forks source link

Function can't load dependencies #945

Open aggieben opened 4 years ago

aggieben commented 4 years ago

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 commented 4 years ago

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

liliankasem commented 2 years ago

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