0

I'm working on a backend that uses both ASP.NET Core Minimal API and Azure Functions (TimerTrigger and HttpTrigger). I want to run both locally for development and testing.

However, I'm running into port conflicts and unclear routing behavior.

Is it possible to combine both in the same .NET Core project? If so, how do I configure launchSettings.json or Program.cs to handle both correctly without conflict?

Any best practices for combining these in a single code base?

1 Answer 1

4

You can run Minimal API and Azure Functions in the same .NET solution. But, not in the same project - it is not even recommended. Because, Minimal API rely on ASP.NET Core's web application and Kestrel.

But Azure Functions runtime uses its own host (func.exe) and startup pipeline.

Because both have different environments/runtimes, that's why it is not recommended to use them in same project.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks @marc_s for suggestion, Can you please help to best options
I have already explained in answer. If you want to have both you should have them in different projects under same solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.