I’m running into the same issue since updating yesterday. Not doing any package yet, just doing Build > Build Solution.
Fortunately, Ctrl F5 build at least works - and I did changes to my code that get compiled and work.
BTW - since this VS2022 update, there’s that new dialog:
Need to have a closer look at that as well. It produces some warnings, but also seems to require some installation and editorconfig stuff.