I’ve had the following warning for a couple of years. How can I get it to build with VS2022?
warning: You are currently using Visual Studio 2019 to compile and link C++ code. It is recommended that you upgrade to Visual Studio 2022 for better performance.
Note: I’ve been using VS2022 every since it came out and always when I doubleclick on a script VS2022 opens (not 2019) its been like this for years.
FWIW I just created a new project and built it, still same message
Yes External Script Editor is set to ‘VS2022’ has been for years.
So whats up?
Not an urgent question, hell by the time I finally get this working VS2025 will be out
Check your system’s Environment (path) variables. Perhaps this still points to the 2019 folder respectively the 2019 folder may be listed first, so if a command calls an exe without a path it may find the 2019 compiler executable first.
I suppose uninstalling all Visual Studio versions and components, then reinstalling should fix this.
Thanks mate, Terribly sorry for the late reply.
I checked system’s Environment (path) variables, and no version of visual studio is listed!
hmmm I thought you always had to do some setup.bat with MSVC (which I’ve been using since version 1.0 back in 94or95, 25 disks IIRC & yes it was crap, borland 4-6 were better)
EDIT: OK tried searching but no vcvarsall.bat included with 2022
bugger it after an hour trying to get unity to use 2022, I’m just gonna uninstall 2019,2017 (I haven’t used the IDE’s for years, its only unity that feels the need to compile with 019 for some reason even though I explicity say use 2022)
EDIT #2: OK uninstalling 2019 & 2017 seemed to do it. Beware though the first couple of tries didn’t want to build (also unity froze during startup, a couple of times), but a reboot and a couple more build attempts it seems to work now