I was facing the same problems
the problem is that visual studio 22 don't support .net 4.5 anymore so it doesn't have the 4.5 developer pack so you need to install vs 2019 because it will install the 4.5 developer pack and you can now use vs 2022 normally