I think you will find the answer in this post: https://support.aspnetzero.com/QA/Questions/11467/MAUI-Project-Build---Program-does-not-contain-a-static-%27Main%27-method-suitable-for-an-entry-point. Read post carefully, there are 2 errors addressed and 1 is the error you are seeing.
How does this support forum work? My company paid for ASP.NET Zero and we are supposed to get a year of support. I am still wrestling with this issue. Can someone please provide assistance?
Yes, I tried that. Still same Access Denied error. I've spent hours trying to figure this out. I hope someone can help, or maybe I will have a breakthrough soon.
Any resolution to this? I am running Visual Studio 2022 17.5.1 with all workloads according the the article and I am still getting these 2 errors.
I also have tested the .NET Maui "Hello World" app and it works fine.