You can use the Visual Studio installer to modify the build tools available by adding or removing from the list. This SO posting describes a similar problem but with v140 missing in a VS2015 Visual Studio installation. MSbuild Error: The builds tools for v140 (Platform Toolset = 'v140') cannot be found
It looks like beginning with VS2015, Microsoft is providing a standard Visual Studio engine that is shared among VS 2015, VS2017, and VS2019 with build tools and various components being updated to provide new features and functionality and new language standards compliance. There are dependencies between the Visual Studio version and what build tools and components can be used with the Visual Studio version, e.g. v142 is not available for VS2017, most probably to provide an incentive for purchasing the newer product.
As a side note, while doing a bit of discovery on this question, I have found some articles that indicate that if you have a recent Visual Studio installed and then install an earlier version of Visual Studio, the default target build tools can also change to the build tools for the earlier install.
In other words, if you have VS2019 with a default target of v142 already installed and then install VS2017, the default target will change to v141 requiring you to actually set the build target to v142 when using VS2019.
This worked for me: Go into the ProjectName.vcxproj file and remove the v142 build script and replace with the build script that corresponds to the Microsoft Visual Studio version you are using or remove the script and Retarget your project if it is an upgraded MVSC.
After installing the latest upgrade of VS2019, I had exactly the same problem as the original poster i.e. error MSB8020 re: building apps in VS2017. I used the simplest app in the series that were not building (all with the error above), and used 'Retarget solution', selecting Windows SDK version 10.0.17763.0. After that I did a rebuild and the app built fine. I checked the properties for each project in the solution, and the Windows SDK version had changed to 10.0.17763.0 as you would expect.
When I then opened other VS2017 apps, they all built fine too without making any changes (these apps all failed before). However, their project properties still refer an SDK version 10.0.14393.0 which presumably is the VS2019 one. All the apps now 'magically' show their toolset as Visual Studio 2017 (v141). HTH, even if not explaining why it works.
Incorporating the Development Kit alongside Visual Studio 2022 requires a preliminary understanding of the underlying toolsets and configurations. This article provides a helpful workaround for getting started.
Both Archicad 25 and Archicad 26 were built with the v142 toolset. Therefore, add-ons should be built with this specific version as well. This means that a manual installation of the v142 toolset is needed before you start building Archicad add-ons with VS2022, given that Visual Studio 2022 defaults to v143.
c80f0f1006