[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: [PATCH] correct ToolsVersion in VS project files

From: <bert_at_qqmail.nl>
Date: Mon, 10 Aug 2015 11:10:37 +0200

Most tools don't care about the ToolsVersion stored in the header of these files. Starting with VS2010 SP1 they even try not to change this value to allow sharing a single set of sourcefiles between multiple Visual Studio versions. The only thing it is really used for is auto detecting which version of VS tools should be used if you build/open the project file standalone… Which in general won’t work for our projects anyway.

The version in the .filter files is completely ignored… VS just re-uses the existing code for parsing msbuild files for its ui.

The PlatformToolset in your other patch is more interesting, but doesn’t really affect with what versions of VisualStudio you can build with as you can just pass the version you want with an msbuild argument such as /P:PlatformToolset=v140. This overrides the version in all your project files.
(And if you build in VS itself fixing is a single right click operation)

Bert
Sent from Mail for Windows 10

From: Stefan
Sent: maandag 10 augustus 2015 04:35
To: dev_at_subversion.apache.org
Subject: Re: [PATCH] correct ToolsVersion in VS project files

On 10/08/2015 04:01, Stefan wrote:
> Hi,
>
> attached are patches for SVN 1.7, 1.8, 1.9 and trunk which correct the
> ToolsVersion-setting in the generated project/filter files for VS >=
> 2010.
> As of VS 2013 the ToolsVersion is no longer statically set to 4.0, but
> rather to the correct toolset version (see:
> https://msdn.microsoft.com/en-us/library/bb383796.aspx).
>
> While I'm not aware of any concrete issue here, for the sake of
> correctness I believe this to be a patch which is worth applying to
> 1.7+ (so that the in 1.7.21 mentioned VS 2015 is "as correct as
> possible").
>
> The patch for 1.7 also drops a redundant entry from gen_win.py (the
> VS2010 entry was specified twice there).
>
> 1.7:
> [[
> Sets the ToolsVersion value correctly in the VS project files for VS
> >= 2013.
> Also drops a redundant entry for VS2010.
>
> * build/generator/gen_vcnet_vcproj.py:
> (write_project): add data.tools_version
>
> * build/generator/gen_win.py:
> (parse_options): remove redundant VS 2010 section and specify
> values for
> tools_version
> (move_proj_file): copy tools_version to data
>
> * build/generator/templates/neon.vcxproj.ezt
> * build/generator/templates/serf.vcxproj.ezt
> * build/generator/templates/svn_config.vcxproj.ezt
> * build/generator/templates/svn_locale.vcxproj.ezt
> * build/generator/templates/vcnet_vcxproj.ezt
> * build/generator/templates/vcnet_vcxproj_filters.ezt
> * build/generator/templates/zlib.vcxproj.ezt
> (): set ToolsVersion to VS version specific value
> ]]
>
> 1.8:
> [[
> Sets the ToolsVersion value correctly in the VS project files for VS
> >= 2013.
>
> * build/generator/gen_vcnet_vcproj.py:
> (write_project): add data.tools_version
>
> * build/generator/gen_win.py:
> (parse_options): specify values for tools_version
> (move_proj_file): copy tools_version to data
>
> * build/generator/templates/serf.vcxproj.ezt
> * build/generator/templates/svn_config.vcxproj.ezt
> * build/generator/templates/svn_locale.vcxproj.ezt
> * build/generator/templates/vcnet_vcxproj.ezt
> * build/generator/templates/vcnet_vcxproj_filters.ezt
> * build/generator/templates/zlib.vcxproj.ezt
> (): set ToolsVersion to VS version specific value
> ]]
>
> 1.9+trunk:
> [[
> Sets the ToolsVersion value correctly in the VS project files for VS
> >= 2013.
>
> * build/generator/gen_vcnet_vcproj.py:
> (write_project): add data.tools_version
>
> * build/generator/gen_win.py:
> (move_proj_file): copy tools_version to data
>
> * build/generator/gen_win_dependencies.py:
> (parse_options): specify values for tools_version
>
> * build/generator/templates/svn_config.vcxproj.ezt
> * build/generator/templates/svn_locale.vcxproj.ezt
> * build/generator/templates/vcnet_vcxproj.ezt
> * build/generator/templates/vcnet_vcxproj_filters.ezt
> (): set ToolsVersion to VS version specific value
> ]]
>
> Regards,
> Stefan
Attached is a corrected patch for trunk (last one contained an
unintentional change in INSTALL).

Regards,
Stefan
Received on 2015-08-10 11:12:20 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.