Visual studio 2022 reports many errors and stops compilation 