Open afetter opened 3 years ago
Facing the same issue on Mac.
System.Private.CoreLib: Could not load type 'Microsoft.Azure.WebJobs.Hosting.IWebJobsStartup2' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.17.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
Project reference pointing to 3.0.22.
[
](url)
I tested the exact same code on Windows 10 and it works fine. Also, I publish it to azure, and it works as well.
I was able to fix the issue after downgrading the 'Azure.Functions.Extensions' package to 1.0.0. Give it a shot!
I'm also facing this issue on mac, I have installed Azure Functions Core Tools
version 3.0.2931
.
It does work when I run func start
in the terminal.
I can confirm that this is NOT only occuring on Mac, I'm facing this issue on Windows 10, using both Visual Studio 2019 and VSCode. Additionally, VSCode fails silently and doesn't even show the error.
I can confirm that this bug was introduce in version 1.1.0 of Microsoft.Azure.Functions.Extensions and that downgrading to 1.0.0 removes the issue.
Is there any other workaround than downgrading Microsoft.Azure.Functions.Extensions from 1.1.0 to 1.0.0? I need to be able to modify the IConfigurationBuilder and access my configuration from my Startup class which is not possible with 1.0.0.
Hi @wterpstra
I only have the issue running from Visual Studio. The terminal and Visual Studio are giving me distinct versions. From terminal no issues running funct start
From Visual Studio
Azure Functions Core Tools (3.0.2358 Commit hash: d6d66f19ea30fda5fbfe068fc22bc126f0a74168) Function Runtime Version: 3.0.13159.0
Terminal
Azure Functions Core Tools Core Tools Version: 3.0.2996 Commit hash: c54cdc36323e9543ba11fb61dd107616e9022bba Function Runtime Version: 3.0.14916.0
Downgrade to 1.0.0 it did work.
I only have that error when trying to debug in VS for Mac => When starting with "func start" in Terminal it is working fine with 1.1.0. When downgrading to 1.0.0 it is also working in VS for Mac.
I just installed the latest azure-functions-core-tools and I do not get this load error anymore.
npm install -g azure-functions-core-tools@3
func --version
3.0.2996
For me npm install didn't work as the VStudio Mac was still using files from following folder /Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/AddIns/MonoDevelop.AzureFunctions/azure-functions-cli VSMac would show the version as: Azure Functions Core Tools (3.0.2358 Commit hash: d6d66f19ea30fda5fbfe068fc22bc126f0a74168) Function Runtime Version: 3.0.13159.0
The normal func start with npm had version as: Core Tools Version: 3.0.3160 Commit hash: 00aa7f43cc5c5f15241b5e6e5363256f19ceb990 Function Runtime Version: 3.0.14916.0
So, I manually duplicated the folder for falling back and copied new dlls from the npm or homebrew install at /usr/local/lib/node_modules/azure-functions-core-tools/bin to the Visual Studio.app folder mentioned above
I have no idea of compatibility with any other VS mac integrations
A colleague of mine had this issue as well (while it was working fine on my Mac); it turns out it's possible to update the Core Tools used by Visual Studio for Mac by updating the list of templates you have when creating a new Azure Function in your solution/project. Credits to Stack Overflow user Matt Ward here.
I can confirm after running into the same problem that Core Tools update from within Visual Studio for Mac (v8) solved it for me. It was not very obvious how to do the update.
You have to create a new project and select Azure Functions as project type then on the next screen "Configure your Azure Functions Project" there will be a small "refresh" icon under all the trigger templates. That's the button that will install and update all the latest required bits.
In my case (Visual Studio, Version 16.9.4, Windows 10) I have solved this problem by renaming the folder 3.4.1 (I couldn't remove it) from the path: C:\Users[User]\AppData\Local\AzureFunctionsTools\Releases . Then next time I have started my azure functions project, a new folder(3.18.0) was created on that path.
In my case did as @rhythmnewt did above. I created a new project, when selecting the project type I clicked update templates. Then closed the project reopened my actual project and I was golden!
I am on mac, I am facing same issue.
I have installed 3.~ latest version of azure-functions-core-tools.
brew tap azure/functions brew install azure-functions-core-tools@3 brew link --overwrite azure-functions-core-tools@3
and it gives me this message
Warning: azure/functions/azure-functions-core-tools@3 3.0.3904 is already installed and up-to-date.
But when i run visual studio for mac 2019 and 2022 both are showing Azure Functions Core Tools (3.0.2358 )
When I install azure-functions-dotnet-extensions to be able to do a Startup class.
The error i got is:
System.Private.CoreLib: Could not load type 'Microsoft.Azure.WebJobs.Hosting.IWebJobsStartup2' from assembly 'Microsoft.Azure.WebJobs.Host, Version=3.0.17.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
But the project reference is poiting to 3.0.18.0.
I'm having this problem on mac.