Basically, the SW macro functionality is hardwired to use a particular version of Visual Studio. For SW 2022, the required Visual Studio version was 2015. You cannot use a newer version. I haven’t tested 2023 or 2024, but I would be surprised if SW changed anything about this.