Skip to content

[bug]: Malformed INCLUDE/LIB Paths Due to Semicolon Handling. #18978

@alexandrelaverdure-eaton

Description

Describe the bug

Details : Conan version 2.16.1, windows 11, MSVC v170, microsoft visual studio 2022.

This is not a bug in Conan itself, but rather a misbehavior in how environment variables are handled when Conan sets them up for Visual Studio builds.

When Conan accumulates import paths (e.g., for INCLUDE, LIB, etc.), the stacking of these paths includes semicolons (;) as part of the actual path value, rather than using them strictly as separators. This leads to malformed environment variables.

So instead of looking like this
Image
It should look like this.
Image
Another option is that conan imports could be listed as one.
This subtle issue did not cause any problem, but I had trouble finding one of my imports that I thought was missing.

How to reproduce it

Any Windows os with multiple imports using msbuilddeps.py should have this issue.

see PR #18979

Edit:
Added context:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions