Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

OnBuildBegin Event is not hitting in VS 2012 Custom project

$
0
0

Hi,

I have created my custom project templates and its working fine. I have write some logic when build the project so I have hook the event from initialize method like below,

DTE2 dte = GetService(typeof(SDTE)) as DTE2;
dte.Events.BuildEvents.OnBuildBegin += new _dispBuildEvents_OnBuildBeginEventHandler(BuildEvents_OnBuildBegin); 

 public void BuildEvents_OnBuildBegin(EnvDTE.vsBuildScope Scope, EnvDTE.vsBuildAction Action)
{


//logic


}
This event hooks perfectly while create a fresh project from Visual Studio. But its not hooked when open an existing projects. Please help me resolve this issue or suggest any alternate way to achieve this?


- Abbas K


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>