azure-functions-core-tools: 4.0.5530: Could not load file or assembly 'Microsoft.Azure.WebJobs.Script.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3c5b9424214e8f8c'. The system cannot find the file specified.
I have just updated Azure Functions Core Tools version in my local machine to the latest (4.0.5530) and now func start is failing.
> func --version
4.0.5530
> func init --worker-runtime dotnet-isolated
Writing C:\Users\Jaliya\Desktop\test-function\.vscode\extensions.json
> func new --template "Http Trigger" --name HttpStart
Template: Http Trigger
Function name: HttpStart
Creating dotnet function...
The function "HttpStart" was created successfully from the "Http Trigger" template.
> func start --verbose
MSBuild version 17.9.4+90725d08d for .NET
Determining projects to restore...
All projects are up-to-date for restore.
test-function -> C:\Users\Jaliya\Desktop\test-function\bin\output\test-function.dll
Determining projects to restore...
Restored C:\Users\Jaliya\AppData\Local\Temp\szmnpezk.rm0\WorkerExtensions.csproj (in 669 ms).
WorkerExtensions -> C:\Users\Jaliya\AppData\Local\Temp\szmnpezk.rm0\buildout\Microsoft.Azure.Functions.Worker.Extensions.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:03.43
%%%%%%
%%%%%%
@ %%%%%% @
@@ %%%%%% @@
@@@ %%%%%%%%%%% @@@
@@ %%%%%%%%%% @@
@@ %%%% @@
@@ %%% @@
@@ %% @@
%%
%
Azure Functions Core Tools
Core Tools Version: 4.0.5530 Commit hash: N/A +c8883e7f3c06e2b424fbac033806c19d8d91418c (64-bit)
Function Runtime Version: 4.28.5.21962
Could not load file or assembly 'Microsoft.Azure.WebJobs.Script.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3c5b9424214e8f8c'. The system cannot find the file specified.
However, it runs fine with in Visual Studio:
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 3
- Comments: 15 (4 by maintainers)
Uninstalling and reinstalling via winget did the trick for me.
Did some testing.
1. I am on
4.0.5455(C:\Program Files\Microsoft\Azure Functions Core Toolsis not empty). Downloaded the 4.0.5530 MSI, and installed (technically this is an update from4.0.5455to4.0.5530).Same error 😦
2. Ran the MSI again (
C:\Program Files\Microsoft\Azure Functions Core Toolsis not empty of course), but this time (like you) did aRepair.That worked 😃
3. Uninstalled
Azure Functions Core Tools(C:\Program Files\Microsoft\Azure Functions Core Toolswas deleted by the uninstaller). Installed4.0.5530from MSI.That worked 😃
Findings
Copied
C:\Program Files\Microsoft\Azure Functions Core Toolsat each scenario and compared.Missing Files/Folders
So it’s definitely something to do with the installer when doing an update.
Hello, we experience the same problem with version 4.0.7317. Downgrading to version 4.0.7030 works for now.
Noting that I just got a separate report of this happening on npm / via the VS Code install path. I have not attempted that repro myself.
Ran into this with 4.0.7317 via WinGet and resolved by un-installing and re-installing. 😒
Experienced this with version 4.0.7317 installed via MSI. Running the ‘Repair’ option on the installer after the initial installation solved the issue.
Same issue for me as well:
following @thomasneuberger advice on uninstall/reinstall using winget solved it for me.
strange: this winget install Microsoft.Azure.FunctionsCoreTools downloads the 530 version but the link above downloads 571!
I am having the same issue but my core tools is: Azure Functions Core Tools Core Tools Version: 4.0.5571 Commit hash: N/A +9a5b604f0b846df7de3eb37b423a9eba8baa1152 (64-bit) Function Runtime Version: 4.30.0.22097
I get the error when I do func host start
I just attempted a repair through the MSI and that seems to have fixed it. I have no idea why the initial installation would have missed that. I wonder if a clean first install as opposed to the
winget update Microsoft.Azure.FunctionsCoreToolspath would be different? I might give that a try tomorrow to see.Interesting. I used
wingetas well.@jaliyaudagedara Thanks for opening this and providing those repro steps! I can confirm the repro on my setup. I agree with your suggested mitigation of pinning back for anyone impacted by this until it can be resolved.
Edit: Also able to confirm that VS has been working fine with this version, which is indeed curious. As a coherence check, I took a working VS project and manually ran
func starton the command line. Same issue. And if I open the project created by the Core Tools in VS and run it there, it works fine. VS does have its own installation of the Core Tools, but the stated commit hashes seem to match, too, so in theory it’s the same bits in both contexts…