Repository navigation
Open
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using Azureazure-functionsIssues related to the Azure Functions integration
Milestone
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
Aspire cannot seem to find the func command from Azure Functions Core Tools on Windows 10.
Expected Behavior
No response
Steps To Reproduce
- Repro possible with basic Aspire starter project + one azure function added with
AddAzureFunctionsProject. - Azure function core tools installed with
npm i -g azure-functions-core-tools@4 --unsafe-perm true, sofuncis added to path (works fine in terminal)
Exceptions (if any)
Unhandled exception: System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'func' with working directory 'bin\Debug\net9.0\'. The system cannot find the file specified.
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at Microsoft.DotNet.Cli.Utils.Command.Execute(Action`1 processStarted)
at Microsoft.DotNet.Tools.Run.RunCommand.Execute()
at System.CommandLine.Invocation.InvocationPipeline.Invoke(ParseResult parseResult)
at System.CommandLine.ParseResult.Invoke()
at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, TimeSpan startupTime, ITelemetry telemetryClient)
.NET Version info
Version: 9.0.100
Commit: 59db016f11
Workload version: 9.0.100-manifests.1e472b70
MSBuild version: 17.12.7+5b8665660
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.100\
.NET workloads installed:
[android]
Installation Source: SDK 9.0.100, VS 17.1.31911.260
Manifest Version: 35.0.24/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.24\WorkloadManifest.json
Install Type: Msi
[aspire]
Installation Source: SDK 9.0.100
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi
[ios]
Installation Source: SDK 9.0.100, VS 17.1.31911.260
Manifest Version: 18.2.9170/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.2.9170\WorkloadManifest.json
Install Type: Msi
[maccatalyst]
Installation Source: SDK 9.0.100, VS 17.1.31911.260
Manifest Version: 18.2.9170/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.2.9170\WorkloadManifest.json
Install Type: Msi
[maui-android]
Installation Source: SDK 9.0.100, VS 17.1.31911.260
Manifest Version: 9.0.0/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.0\WorkloadManifest.json
Install Type: Msi
[maui-ios]
Installation Source: SDK 9.0.100, VS 17.1.31911.260
Manifest Version: 9.0.0/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.0\WorkloadManifest.json
Install Type: Msi
[maui-maccatalyst]
Installation Source: SDK 9.0.100, VS 17.1.31911.260
Manifest Version: 9.0.0/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.0\WorkloadManifest.json
Install Type: Msi
[maui-windows]
Installation Source: SDK 9.0.100, VS 17.1.31911.260
Manifest Version: 9.0.0/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.0\WorkloadManifest.json
Install Type: Msi
Configured to use loose manifests when installing new manifests.
Host:
Version: 9.0.0
Architecture: x64
Commit: 9d5a6a9aa4
.NET SDKs installed:
3.1.426 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]
5.0.104 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]
6.0.136 [C:\Program Files\dotnet\sdk]
7.0.120 [C:\Program Files\dotnet\sdk]
8.0.111 [C:\Program Files\dotnet\sdk]
9.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
arm64 [C:\Program Files\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\arm64\InstallLocation]
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Anything else?
AppHost package versions:
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.0.0" />
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Azure.StaticWebApps" Version="9.1.0" />
<PackageReference Include="Aspire.Hosting.Azure.Functions" Version="9.0.0-preview.5.24551.3"/>
Metadata
Metadata
Assignees
Labels
area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using Azureazure-functionsIssues related to the Azure Functions integration
Activity
captainsafia commentedon Jan 2, 2025
Dante De Ruwe (@DanteDeRuwe) Thanks for filing this issue!
Are you attempting to launch the application from Visual Studio? If so, you may need to install Azure Tooling for VS per the instructions in this page. Visual Studio doesn't resolve the local Functions host from the npm-installed directory and relies on the version provided by the VS workloads.
DanteDeRuwe commentedon Jan 4, 2025
Hi Safia Abdalla (@captainsafia), thanks for your swift response! I am running the aspire host project from the CLI with
dotnet run --project <aspire-host-project-name>.I am a Jetbrains Rider user; running it from inside that IDE gives another weird error that is documented here and also here with a comment from you
I could install VS to see if that resolves it, but I'm pretty sure it should be the case that Aspire works ootb with the
dotnetCLI, no?captainsafia commentedon Jan 6, 2025
Dante De Ruwe (@DanteDeRuwe) Thanks for the additional info.
The CLI issue might be the easier one to investigate since there are less moving parts there. For editor-based scenarios, the editor's Azure Functions integration comes into play when coordinating the launching of the host.
Some questions to help debug:
func --version?dotnet buildon your project succeed without any errors?DanteDeRuwe commentedon Jan 17, 2025
I will take a look at this soon. Thanks for your patience in advance
DanteDeRuwe commentedon Feb 2, 2025
Hi Safia Abdalla (@captainsafia),
func --versionreturns4.0.6610dotnet runon the aspire host of your repro project, it has the same issue:mattchenderson commentedon Feb 14, 2025
This sounds likely related to Azure/azure-functions-dotnet-worker#2884. It seems like the issue can be reproduced consistently when the Core Tools is installed via NPM, but installing from other channels may work.
ormasoftchile commentedon Jul 6, 2025
I am seeing the same error. Safia Abdalla (@captainsafia) do you have any update? I cloned the repo you referenced. My results are also erroring:
Console log:
Aspire.Hosting.Dcp.dcpctrl.ExecutableReconciler: Error: run session could not be started: IDE returned a response indicating failure {"Executable": {"name":"functions-ebhamket"}, "Reconciliation": 29, "Status": "500 Internal Server Error", "Body": "There is no Functions runtime available that matches the version specified in the project."}
Do you know of any update?
Visual Studio 17.14.7
func --version
4.0.7317
dotnet --list-sdks
9.0.301 [C:\Program Files\dotnet\sdk]
ormasoftchile commentedon Jul 6, 2025
Have to add that after reinstalling Azure core tools using MSI (originally had npm installation), I am able to run from visual studio code. Running from Visual Studio still fails.
captainsafia commentedon Jul 28, 2025
Cristián Ormazábal (@ormasoftchile) Based on the description of your issue, can you try seeing if the Azure Functions tooling installed on your Visual Studio is up to date? You should be able to verify this by searching for
Azure Functionsin your VS settings.Mivaweb commentedon Jul 30, 2025
I am also facing the same issue. Running from Visual Studio with F5 works as expected. Running from command line using dotnet run on the AppHost results in the Function not beeing started.
Unhandled exception: An error occurred trying to start process 'func' with working directory 'bin\Debug\net8.0\'. The system cannot find the file specified.I can confirm that the azure core tools are installed and that
func --versionworks.davidfowl commentedon Oct 25, 2025
Fabio Cavalcante (@fabiocav) Jake (@JakeRadMSFT) Adam Ratzman (@adamint) Matthew Henderson (@mattchenderson) Phil Henning (@phenning) Can we get someone to look at this issue to understand why functions + aspire is broken in VS code?
antsok commentedon Oct 27, 2025
I have observed this reported issue when func was installed via npm. However, directly running func start failed with the same error as observed in aspire dashboard, so it may not be aspire specific.
This set of steps resolved it for me:
npm uninstall -g azure-functions-core-tools@4),kamranayub commentedon Dec 18, 2025
I resolved it by updating the
Microsoft.Azure.Functions.Workerto a later version. I guess mine was out of date as this was closed as fixed in this PR: Azure/azure-functions-dotnet-worker#3127