The following error warning gets me every time I am working with Azure Functions in Visual Studio Code when I run func start:
No job functions found. Try making your job classes and methods public. If you’re using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you’ve called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).
I am developing my Azure Functions as a C# class library project (.csproj), which means, I must include the –build option to generate the library .dll. So when I run func start –build, my world is again filled with rainbows and unicorns.
Recommended resources
- https://blogs.msdn.microsoft.com/appserviceteam/2016/12/01/running-azure-functions-locally-with-the-cli
- https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local
- https://docs.microsoft.com/en-us/azure/azure-functions/functions-develop-local
Discover more from Matt Ruma
Subscribe to get the latest posts sent to your email.
Did you find an answer Matt?
You just need to run
func start --build
… that should do the trick!And how do you do that? In VS.
From the terminal window in VS Code, run
func start --build
.If you debug/run from Visual Studio, somehow, even with latest Microsoft.NET.Sdk.Functions (v1.0.28), its not able to detect AzureFunctions defined in the project.
I root caused the issue to Project properties > Debug > Working Directory is not set. Set it to the actual directory where binaries are found and your AzureFunctions becomes available for debug.
PS, this would add launchSettings.json /profiles/workingDirectory=/objd/amd64/
![image](https://user-images.githubusercontent.com/3484074/59544356-f0226c00-8ec5-11e9-9fc3-eeeab5e9b5bf.png)
This will work if you run your visual studio as run as administrator.It worked for me ..Took all day to find this simple solution