How to determine build action type in vsix

shriram 135 Reputation points
2025-05-06T08:20:19.5833333+00:00

I trying to create a extension where it will trigger when the solution is started build but i face method not implemented error when i try to clean the solution . I have attached the code and what i need is When the solution is build i need to skip the UpdateSolution_begin method, i tried checking for build action type but i am unable to get hope someone can help me

Thanks in advance

#region IVsUpdateSolutionEvents2 Members
public int UpdateSolution_Begin(ref int pfCancelUpdate)
{
    bool codeCompiledSuccessfully = true;
    //add your code
    if (!codeCompiledSuccessfully)
    {
        pfCancelUpdate = 1;
    }
    return VSConstants.S_OK;
}
public int UpdateSolution_Done(int fSucceeded, int fModified, int fCancelCommand)
{
    if (fSucceeded == 1)
    {
        
    }
    return VSConstants.S_OK;
}
public int UpdateSolution_StartUpdate(ref int pfCancelUpdate)
{
    
    return VSConstants.S_OK;
}
public int UpdateSolution_Cancel()
{
    
    return VSConstants.S_OK;
}
public int OnActiveProjectCfgChange(IVsHierarchy pIVsHierarchy)
{
    
    return VSConstants.S_OK;
}
public int UpdateProjectCfg_Begin(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, ref int pfCancel)
{
    
    return VSConstants.S_OK;
}
public int UpdateProjectCfg_Done(IVsHierarchy pHierProj, IVsCfg pCfgProj, IVsCfg pCfgSln, uint dwAction, int fSuccess, int fCancel)
{
    
    return VSConstants.S_OK;
}
#endregion

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
279 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.