Skip to content

Conversation

@memsharded
Copy link
Member

Changelog: Bugfix: MSBuildToolchain explicitly adds the specific toolset .props file when compiler.update is defined, otherwise, activating vcvars is not enough.
Docs: Omit

Close #19125

Comment on lines +27 to +29
{% if toolset_version_full_path %}
<Import Project="{{toolset_version_full_path}}" />
{% endif %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this essentially mirrors the MSBuild instructions here: https://devblogs.microsoft.com/cppblog/side-by-side-minor-version-msvc-toolsets-in-visual-studio-2019/

and that the usual caution applies w.r.t ensuring this happens before <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />??

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, mostly, but instead of doing the copy and referring to it by relative path to the project, it does exactly the same as CMake, defines the full path to the original location of the .props file.

and that the usual caution applies w.r.t ensuring this happens before ??

yes, exactly, in our templates and tests this always happens, but it is true that it is not explicitly documented. I think it is a good idea to add it to the docs explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] MSbuild fail to enforce VCToolsVersion

3 participants