question

AshokaK-9467 avatar image
0 Votes"
AshokaK-9467 asked TianyuSun-MSFT commented

Not able to compile VC12 project in VS2013 and VS2017

Hi,

I have a Visual studio Professional 2012 project but VS Professional 2013 is installed. VS-2012 is not available.
When I compile these projects using VS-Prof-2013, I get the build-tools-set missing error.

Error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets

I tried to follow few threads on this forum but none helped to solve the issue.

  1. Installed VS-Prof-2017 with build-tool v141. Compiling with this generated even more errors about missing C/C++ headers along with v141

"Error C1083 Cannot open include file: 'time.h': No such file or directory"

  1. Used VS-Prof-2013 with tool set v120, but got same error - v141 is missing. I have set the Platform toolset to "v120" which exists on system.



Currently I have v120, v120_xp, and v141 toolset installed.
Please guide me on how to proceed to compile VC12 project files.

Regards,
Ashoka

vs-setupvs-msbuild
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TianyuSun-MSFT avatar image
0 Votes"
TianyuSun-MSFT answered TianyuSun-MSFT commented

Hi Ashoka,

Welcome to Microsoft Q&A forum.

It is a little weird, as for VS Professional 2013, the error message mentioned v141, instead of v120 or v110.

Anyway, please also select the newer version of Windows SDK in project’s property page > Configuration Properties > General > Windows SDK Version(the windows sdk can be installed from VS Installer > Modify > Individual Components), and make sure that you have selected Visual Studio 2017(v141) in project’s property page.

Besides, please right-click your project > Unload Project > right-click it again > Edit … then in .XXproj file, make sure that the <PlatformToolset> property has been set to v141.

Best Regards,
Tianyu


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks Tianyu,

I will try to follow your steps. I have a question,

On my system, i see that "V110" and "V120" directories under "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\".

Since toolset v141 is visible for selection it must be installed. But where is the folder for this? I was expecting another folder "V141" in same directory along with "V110" and "V120". Does it mean the installation of VS-2017 was not proper?

Regards, Ashoka

0 Votes 0 ·

Hi Ashoka, sorry for the delay in reply. Yes, if toolset v141 is visible for selection it must be installed. There are some differences between VS 2015/previous versions of VS and VS 2017/VS 2019, and the location where the target platform stored is also different. This doesn’t mean the installation of VS 2017 was not proper.

0 Votes 0 ·