Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 441 forks source link

Debug startup fails "no Functions runtime available" #5239

Open Shrn-Prmshr opened 5 years ago

Shrn-Prmshr commented 5 years ago

It seems this is not a new issue, and you can find the old reported issue here. I have tried all of the suggested solutions but no success.

In my case, I use v3-preview and .Net core 3.0. and I use FunctionsStartup to resolve DI. It was working until this morning and it put me in a complicated position. why?

  1. When I try to use PowerShell and try "C:\Users...\AppData\Local\AzureFunctionsTools\Releases\3.0.3\cli\func.exe start" I get

    No job functions found. Try making your job classes and methods public. If you're using binding extensions (e.g. Azure Storage, ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. builder.AddAzureStorage(), builder.AddServiceBus(), builder.AddTimers(), etc.).

`

<PackageReference Include="Microsoft.Azure.WebJobs" Version="3.0.14" />
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Storage" Version="3.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.0.0" />
<PackageReference Include="Microsoft.NET.Sdk.Functions" Version="1.0.30-beta2" />
<PackageReference Include="StructureMap.Microsoft.DependencyInjection" Version="2.0.0" />

`

  1. I have built the whole of this solution with .Net Core 3.0 and Azure function v2 is not compatible with that at all. so I can not just create a V2. it takes more than the time that I have to rebuild all .net core 2.x

  2. Azure Function V2, has this issue https://github.com/Azure/azure-functions-host/issues/4049,

Now, I need a proper answer. how should I fix my problem? Can I trust this v3-preview? Until yesterday everything was fine.

jdaaboul commented 5 years ago

I have gotten this issue today. What could of happened between today and yesterday for it to break like this ?

FrankGagnon commented 5 years ago

I've also started having this issue this morning. I've tried updating VS and reverting the Microsoft.Azure.WebJobs.Extensions nuget to 3.0.2 from 3.0.5 since I updated it yesterday and it didn't help.

david-peden-q2 commented 5 years ago

I have the same issue. When I hit F5, I now get presented this error:

image

The important point here is that, as with the other commenters, this issue started happening today. Everything was fine yesterday.

I tried upgrading to latest VS (16.3.7->16.3.9) and updated to the latest tools:

npm install -g azure-functions-core-tools@preview

and that did not resolve the issue.

jdaaboul commented 5 years ago

here is a temporary solution for the people in this thread. Add a dubug config with the instructions from this comment https://github.com/Azure/azure-functions-host/issues/5145#issuecomment-546081185

Shrn-Prmshr commented 5 years ago

@jdaaboul, @david-peden-q2 and @Francisco-Gamino, you need to use VS2019 preview 4. Download that. It will fix the problem with Azure Function v3-preview, and .net core 3.0.

prohith46 commented 5 years ago

I am also facing same issue from yesterday

jamyspex commented 5 years ago

@jdaaboul, @david-peden-q2 and @Francisco-Gamino, you need to use VS2019 preview 4. Download that. It will fix the problem with Azure Function v3-preview, and .net core 3.0.

I have downloaded preview 4.0 and I'm still getting the issue.

david-peden-q2 commented 5 years ago

@jamyspex I installed Preview 5 and my functions work again.

image

https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-preview#16.4.0-pre.5.0

Thank you @Shrn-Prmshr!

jamyspex commented 4 years ago

@jamyspex I installed Preview 5 and my functions work again.

image

https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes-preview#16.4.0-pre.5.0

Thank you @Shrn-Prmshr!

Updating to Preview 5 hasn't worked for me unfortunately.