Unable to update Azure Functions Core Tools in Visual Studio Mac

走远了吗. 提交于 2021-02-18 17:53:06

问题


I'm developing an Azure Functions App which has a variety of different triggers (HTTP, QUEUE, TIMER and SignalR). They work fine when I'm developing on my Work PC (Windows) but they don't work when I'm developing at home on my Mac.

I get the following error:

A host error has occurred [28/03/2019 20:37:53] Microsoft.Azure.WebJobs.Extensions.Storage: Could not load type 'Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Value cannot be null. Parameter name: provider

I get this error only when I add in (to a clean project) the Microsoft.Azure.WebJobs.Extensions.Storage nuget package.

It turns out that I'm running the exact same versions of the SDK that GiddyUpHorsey is, following up on BrettSam's advice I try to update the CLI via Brew as per the docs and also via NPM as per this answer

However as you see here nothing works

Any ideas?


回答1:


Visual Studio for Mac 7 does not support using a Homebrew installation of Azure Functions Core Tools. Visual Studio for Mac 7 ships a copy of the tools and will only use those.

Visual Studio for Mac 8 does support this. It also has a built-in feature to update the templates and Azure Functions Core Tools itself, in a local directory, if it finds these are out of date. The Azure Functions team provide an online feed which Visual Studio for Mac will use. This update feature is available on creating a new Azure Functions project in the New Project.

If are using Visual Studio for Mac 7 you may be able to copy an updated version of the tools to the directory:

/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.AzureFunctions/azure-functions-cli/

However I would take a backup of that directory or the entire Visual Studio.app first before trying to update those files so you can rollback if it does not work.



来源:https://stackoverflow.com/questions/55406677/unable-to-update-azure-functions-core-tools-in-visual-studio-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!