Skip to content

Visual C++ project and properties #350

Answered by kaheimri
Agrael1 asked this question in Q&A
Discussion options

You must be logged in to vote

The most common things queried in our project is compiler options. That requires several queries: DTE->Project as VCProject->IVCRulePropertyStorage2 | VCCLCompilerTool which are quire cumbersome. As of now I could not find any converters from VS.Solution.GetActiveProjectAsync() to VCProject neither are there any guides on how to get project property page values.

You can convert a Community.VisualStudio.Toolkit.Project to a VCProject like this:

private const int ExtObject = (int)__VSHPROPID.VSHPROPID_ExtObject;
public static async Task<VCProject?> ConvertToVcProjectAsync(Community.VisualStudio.Toolkit.Project? project)
{
    if (project == null)
        return null;

    await ThreadHelper.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Agrael1
Comment options

@Agrael1
Comment options

@kaheimri
Comment options

Answer selected by Agrael1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants