I got 567 times of this error. I just updated VS 2022 17.7.5 to 17.8.6. After that I got this error
Error RZ3901 View component 'Scribe.Web.ViewComponents.RegularPaymentGridViewComponent' must have exactly one public method named 'Invoke' or 'InvokeAsync'. Web C:\Users\smayd\OneDrive\Masaüstü\ScribeWeb\Scribe\Web\SDKRAZORGENERATE 1
in my project, also This error
'This solution contains packages with vulnerabilities. Manage NuGet Packages ' appear top of the solution explorer.
The following question is similar to yours:
ViewComponent must have one public method named 'InvokeAsync' or 'Invoke' - ASP.NET CORE (.NET 6)
Have a look at the accepted answer and see if it helps out solving your issue.
Update based on comment below
I suspect the issue is because the .Net version you are using are getting out of date. I strongly suggest you migrate/upgrade to a newer version like minimum .Net 6 for better support.