Visual Studio: How to detect any changes on project properties and trigger event from extension when user clicks apply

Necati Akbasoglu 1 Reputation point
2022-12-27T16:40:15.237+00:00

I'm trying to write VS extension (VS Professional 2022 with Version 17.2.6) for VC++ projects, I want to detect any changes on project properties (Additional include directories, additional using directories etc.) when user changes and clicks apply on project properties page.

I don't want to trigger event until user clicks apply. If user clicks, I want to fire an event from My extension. Thanks for your help.

I tried to capture Command Events from EnvDTE but I did not find Command code for Apply button. In the case of clicking apply, VsStd97CmdId will be 684 or 1990. Those are not specific for apply command.

Other thing that I tried was, detecting changes on project file, but Changes are not saved vcxproj file until save or save-all

Developer technologies | Visual Studio | Testing
{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.