For anyone having this problem with .NET 8 you need to look in the output window and show output from Windows Forms in the drop-down.
In my case it was unable to find Microsoft.Extensions.Logging.Abstractions
version 8.0.0.0. I had version 9.0.0.0 installed as a transistive package reference of Microsoft.Extensions.Caching.Memory
.
You will need to look through your installed packages and find the one that has a depdency on a higher version of the missing pacakge and downgrade that to an 8.X.X.X version.