Reputation: 1656
I've been given the task to debug an Azure function on VS 2022 targeting .Net Framework 4.8. While its straight forward to debug it in .Net Core 3.0 or later, I keep getting the error - A project with an Output Type of Class Library cannot be started directly, when I try to run it by pressing F5. Looking around, I followed this link to download Azure functions core tools; https://github.com/Azure/azure-functions-core-tools but it hasn't worked even after restarting VS.The function has following properties:
While I can run and debug functions written in .Net Core 3.1 and .Net 6 but I'm struggling with this legacy function. Any help is really appreciated.
Upvotes: 0
Views: 97
Reputation: 4883
We have tried to create Azure function with .net framework 4.8
and successfully tested in our local by using visual studio 2022.
We have installed azure function core tool 4x
on our local. Make sure that only one azure function core tool has installed on our local.
Created one azure function with http trigger by selecting .net framework
and targeting it to version 4.8
.
Upvotes: 1