Open jaliyaudagedara opened 8 months ago
Downgraded Azure Functions Core Tools back to 4.0.5455
, it works.
I am sorry guys, this isn't cool. Lately, there seem to be a lot of breaks.
> func start
MSBuild version 17.9.4+90725d08d for .NET
Determining projects to restore...
Restored C:\Users\Jaliya\Desktop\test-function\test-function.csproj (in 334 ms).
test-function -> C:\Users\Jaliya\Desktop\test-function\bin\output\test-function.dll
Determining projects to restore...
Restored C:\Users\Jaliya\AppData\Local\Temp\crxzujxi.c5l\WorkerExtensions.csproj (in 423 ms).
WorkerExtensions -> C:\Users\Jaliya\AppData\Local\Temp\crxzujxi.c5l\buildout\Microsoft.Azure.Functions.Worker.Extensions.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:03.29
Azure Functions Core Tools
Core Tools Version: 4.0.5455 Commit hash: N/A (64-bit)
Function Runtime Version: 4.27.5.21554
[2024-02-20T17:34:19.597Z] Found C:\Users\Jaliya\Desktop\test-function\test-function.csproj. Using for user secrets file configuration.
Functions:
HttpStart: [GET,POST] http://localhost:7071/api/HttpStart
For detailed output, run func with --verbose flag.
[2024-02-20T17:34:21.216Z] Worker process started and initialized.
[2024-02-20T17:34:25.851Z] Host lock lease acquired by instance ID '000000000000000000000000CF6A328F'.
@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 start
on 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...
@mattchenderson,
No problem.
but the stated commit hashes seem to match, too, so in theory it's the same bits in both contexts...
Yeah, I checked that as well, have no clue what the difference is.
How had you performed the update? I did it through winget for mine, which ultimately uses the MSI.
VS actually pulls down everything directly as a zip. Comparing the two, it seems like the MSI is just not including Microsoft.Azure.WebJobs.Script.Abstractions.dll for some reason, but the version VS has includes that.
Interesting. I used winget
as well.
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.FunctionsCoreTools
path would be different? I might give that a try tomorrow to see.
Did some testing.
1. I am on 4.0.5455
(C:\Program Files\Microsoft\Azure Functions Core Tools
is not empty). Downloaded the 4.0.5530 MSI, and installed (technically this is an update from 4.0.5455
to 4.0.5530
).
Same error :(
2. Ran the MSI again (C:\Program Files\Microsoft\Azure Functions Core Tools
is not empty of course), but this time (like you) did a Repair
.
That worked :)
3. Uninstalled Azure Functions Core Tools
(C:\Program Files\Microsoft\Azure Functions Core Tools
was deleted by the uninstaller). Installed 4.0.5530
from MSI.
That worked :)
Findings
Copied C:\Program Files\Microsoft\Azure Functions Core Tools
at each scenario and compared.
Missing Files/Folders
$notWorkingDirPath = "C:\Users\Jaliya\Desktop\Azure Functions Core Tools-AfterUpdate"
$workingDirPath = "C:\Users\Jaliya\Desktop\Azure Functions Core Tools-AfterRepair"
robocopy $workingDirPath $notWorkingDirPath /e /l /ns /njs /njh /ndl /fp
So it's definitely something to do with the installer when doing an update.
Uninstalling and reinstalling via winget did the trick for me.
winget uninstall Microsoft.Azure.FunctionsCoreTools
winget install Microsoft.Azure.FunctionsCoreTools
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.
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
strange: this winget install Microsoft.Azure.FunctionsCoreTools downloads the 530 version but the link above downloads 571!
Same issue for me as well:
Azure Functions Core Tools
Core Tools Version: 4.0.5530 Commit hash: N/A +c8883e7f3c06e2b424fbac033806c19d8d91418c (64-bit)
Function Runtime Version: 4.28.5.21962
following @thomasneuberger advice on uninstall/reinstall using winget solved it for me.
I have just updated Azure Functions Core Tools version in my local machine to the latest (
4.0.5530
) and nowfunc start
is failing.However, it runs fine with in Visual Studio: