Azure / Azure/azure-functions-host
VS 2019 Function app project not compatible with HTTP worker
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### Repro steps
1. Create a new function app
2. Add a "main" method
3. Add an HTTP trigger function
4. F5
#### Expected behavior
The host starts up and either I can trigger my HTTP function or I get some meaningful error message from the Functions host if I made some mistake.
#### Actual behavior
The host fails to start with a generic .NET Core error message like the following:
```
[1/27/2020 6:04:25 PM] Starting worker process:dotnet "C:\Users\cgillum\source\repos\HttpWorkerTest\bin\Debug\netcoreapp2.1\HttpWorkerTest.dll" --workerId c11890f1-d98a-4393-975e-50e5edb31048 --port 7621
[1/27/2020 6:04:25 PM] dotnet process with Id=42476 started
[1/27/2020 6:04:26 PM] Could not execute because the specified command or file was not found.
[1/27/2020 6:04:26 PM] Possible reasons for this include:
[1/27/2020 6:04:26 PM] * You misspelled a built-in dotnet command.
[1/27/2020 6:04:26 PM] * You intended to execute a .NET Core program, but dotnet-C:\Users\cgillum\source\repos\HttpWorkerTest\bin\Debug\netcoreapp2.1\HttpWorkerTest.dll does not exist.
[1/27/2020 6:04:26 PM] * You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
[1/27/2020 6:04:26 PM] Exceeded http worker restart retry count. Shutting down Functions Host
[1/27/2020 6:04:26 PM] Stopping host...
[1/27/2020 6:04:26 PM] Stopping JobHost
[1/27/2020 6:04:26 PM] Job host stopped
[1/27/2020 6:04:26 PM] Host shutdown completed.
```
It's not at all clear what the actual problem is.
#### Known workarounds
It's my understanding that there is no workaround for this, and that this is related to the file/folder structure of my output. Unfortunately I don't have any control of the output since I'm using Visual Studio and F5 debugging.
#### Related information
* C# / .NET Core 2.1
* HTTP trigger - default template
* Host.json copied from example:
```json
{
"version": "2.0",
"httpWorker": {
"description": {
"defaultExecutablePath": "dotnet",
"defaultWorkerPath": "HttpWorkerTest.dll"
}
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.