Skip to content

Setting to specify the Visual Studio tool directory #1419

@DougGregor

Description

@DougGregor

Is your feature request related to a problem? Please describe.
If there are multiple versions of Visual Studio installed, Swift (via Clang) will pick one of them based on a complicated series of checks for environment variables / path / config files / registry. If it picks the wrong one, it's hard to know how to select the one you wanted.

Describe the solution you'd like
Can we add a setting to the extension that lets us directly specify the path to the Visual Studio tools that Swift should use? The most straightforward way seems to be to set the VCToolsInstallDir environment variable.

Describe alternatives you've considered
Setting the environment outside of VS Code, in tasks.json, or with unsafe flags in SwiftPM. None of them are as discoverable as a setting would be, especially given that we have an SDK path setting already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Unscreened

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions