Skip to content

[Bug]: WindowsVsToolChain Plugin VC version mismatch #1308

@Javagedes

Description

@Javagedes

Is there an existing issue for this?

  • I have searched existing issues

Current Behavior

When multiple instances of a compiler exist for a specific VS toolchain (not VS2022 vs VS2019, but VS2022 version XXXXX vs VS2022 version YYYYY) locally, the version selected for VSXXXX_PREFIX HERE may not match the version selected for the other miscellaneous variables (such as LIBPATH, LIB, etc) set HERE because the current implementation of QueryVcVariables only allows us to filter on a toolchain version, not a compiler version, so the returned variables will based off of a non determinate vc version, which could lead to linking errors.

Expected Behavior

The VC selected for VSXXXX_PREFIX should be the same VC for the other variables set such as LIB, LIBPATH, etc.

Steps To Reproduce

  1. Run vs_BuildTools.exe
  2. Select to modify your current VS2022 (or other) installation
  3. Select the "Individual components" tab
  4. Selecting an additional version of MSVC v143 - VS 2022 C++ x64/x86 build tools in addition to the currently installed
  5. Run stuart_ci_build -c .\.pytool\CISettings.py -p MdePkg -d CompilerPlugin=run -t DEBUG -a X64 -v
  6. The build will fail on MipiSysTLib due to linking errors regarding the header files being from a different VC then the compiler.

Build Environment

- OS(s): Windows
- Tool Chain(s): VS Toolchains
- Targets Impacted: Any

Version Information

Any

Urgency

High

Are you going to fix this?

I will fix it

Do you need maintainer feedback?

No maintainer feedback needed

Anything else?

No response

Metadata

Metadata

Assignees

Labels

state:staleHas not been updated in a long timetype:bugSomething isn't workingurgency:highSignificant with a critical impact

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions