EnvDTE and VisualStudio 2017 (MSBUILD) - How get %() Project Item Metadata? RRS feed

  • Question

  • Hello,

    I building a VSIX context menu who create a lib file from header file (see more). For the moment, everything working fine... context menu, dialog and CL process.

    Now I'm in tuning phase to make some part more automatically. I'm sticking on two problem that I can't reach the information thru code.

    1. CL.EXE /FU parameter: I can get references thru VSProject::References, but I can't evaluate the %(ForcedUsingFiles) project item metadata, to get the platform.winmd location/version.  I have see something about Microsoft::Build::Evaluation::ProjectItem vs EnvDTE::ProjectItem, but how switch EnvDTE to Evaluation? I see no example.
    2. CL.EXE /ZW parameter: I can get a lot of parameter inside VCCLCompilerTool, but i didn't see any variable pointing on /ZW (Consume Windows Runtime Component)? Look like inside project item metadata %(CompileAsWinRT)

    That's resume to one question: how get %() MSBuild Project Item Metadata?


    more reference about base code (see more stuff in answer)

    • Edited by Fleµve Monday, October 2, 2017 3:46 PM Redefine question
    Monday, October 2, 2017 3:42 AM