无法更新Visual Studio Mac中的Azure Functions核心工具 [英] Unable to update Azure Functions Core Tools in Visual Studio Mac
问题描述
我正在开发一个Azure Functions应用程序,该应用程序具有各种不同的触发器(HTTP,QUEUE,TIMER和SignalR).当我在Work PC(Windows)上进行开发时,它们可以正常工作,但是当我在Mac上在家中进行开发时,它们将无法工作.
我收到以下错误:
发生主机错误[28/03/2019 20:37:53] Microsoft.Azure.WebJobs.Extensions.Storage:无法从程序集"Microsoft.Azure.WebJobs.Host,版本="中加载类型"Microsoft.Azure.WebJobs.Hosting.IOptionsFormatter"3.0.3.0,文化=中性,PublicKeyToken = 31bf3856ad364e35'.值不能为空.参数名称:provider
仅当我将Microsoft.Azure.WebJobs.Extensions.Storage nuget程序包添加到一个干净的项目中时,才会出现此错误.
事实证明,我正在运行与
有什么想法吗?
Visual Studio for Mac 7不支持使用Azure功能核心工具的Homebrew安装.Visual Studio for Mac 7附带了这些工具的副本,并且只会使用这些工具.
Visual Studio for Mac 8确实支持此功能.如果发现模板和Azure Functions Core Tools本身已过期,它还具有内置功能,可以在本地目录中更新模板和Azure Functions Core Tools本身.Azure Functions团队提供了Visual Studio for Mac将使用的在线提要.在新项目"中创建新的Azure Functions项目时,可以使用此更新功能.
如果使用的是Visual Studio for Mac 7,则可以将工具的更新版本复制到以下目录:
/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.AzureFunctions/azure-functions-cli/
但是,在尝试更新这些文件之前,我将首先对该目录或整个 Visual Studio.app
进行备份,以便在不起作用时可以回滚.
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?
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.
这篇关于无法更新Visual Studio Mac中的Azure Functions核心工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!