Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] fix msbuild template #15053

Merged
merged 2 commits into from
Jan 9, 2023

Conversation

SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented Jan 1, 2023

There is a big confusion in current assumption of the interaction between MSBuildToolchain/MSBuildDeps generators and MSBuild helper: actually there is no automagic injection of these props files in MSBuild currently.
I've proposed conan-io/conan#12817 which should allow smooth usage like other families of generators + build helper (CMakeToolchain/CMakeDeps + CMake, AutotoolsToolchain/AutotoolsDeps + Autotools, MesonToolchain/MesonDeps + Meson etc), but meanwhile this msbuild template is broken. So here is a workaround.

Moreover:

  • Most of the time, configuration attribute of MSBuildToolchain & MSBuildDeps should be set (usually to the same value than build_type attribute of MSBuild helper, but it can be more tricky).
  • platform attribute of MSBuild should not be overridden usually (and if it's overridden, the one of MSBuildDeps should also be overridden accordingly I guess). The default one is more robust than the one proposed previously in this template.
  • No need to call VCVars.generate(), it's already called under the hood by MSBuildToolchain.generate() (and actually it's more robust because it handles IntelCC).

jwillikers
jwillikers previously approved these changes Jan 3, 2023
SSE4
SSE4 previously approved these changes Jan 3, 2023
@SpaceIm SpaceIm dismissed stale reviews from SSE4 and jwillikers via 1f977b6 January 7, 2023 18:23
@prince-chrismc prince-chrismc reopened this Jan 9, 2023
@conan-center-bot conan-center-bot merged commit 6cf288b into conan-io:master Jan 9, 2023
@SpaceIm SpaceIm deleted the fix/msbuild-template branch January 9, 2023 11:40
RubenRBS pushed a commit to RubenRBS/conan-center-index that referenced this pull request Jan 16, 2023
* fix msbuild template

* import each props file with distinct tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants