Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
778 views
in Technique[技术] by (71.8m points)

.net - Run Visual Studio 2008 Macro on Pre Build Event

I have some Visual Studio Macros created in visual studio which run from the macro explorer and/or keyboard shortcuts. I would like to run these automatically on pre/post build events but see no option to do so in the project properties. Can anyone tell me if this is possible and, if so, how?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In your macro there are 4 build events you can hook into:

  • OnBuildBegin -- Will fire when any build operation is fired from the IDE. It fires only once for a full solution or multiproject build operation.

  • OnBuildDone -- Will fire when a build operation completes. This event fires only once for a full solution or multiproject build operation.

  • OnBuildProjConfigBegin -- Will fire when a project build begins. This event is used to catch each project build event within a solution or multiproject build operation.

  • OnBuildProjConfigDone -- Will fire when a project build completes. This event is used to catch the completion of each project build within a solution or multiproject build operation.

Common Environment Object Model Events


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...