Я написал макрос для своего собственного проекта, так как мне требовались именно эти функции:
Вы можете написать макрос, который сделает это за вас. Перейти в Инструменты -> Макросы IDE
Оказавшись там, дважды щелкните модуль EnvironmentEvents и добавьте этот код:
Private Sub BuildEvents_OnBuildBegin(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildBegin
If (Scope = EnvDTE.vsBuildScope.vsBuildScopeSolution)
//Do whatever solution independent stuff you need here.
If(DTE.Solution.FullName = "C:\My Solutions\Solution1.sln")
//Do whatever you need for Solution1.sln here.
End If
End If
End Sub
Private Sub BuildEvents_OnBuildDone(ByVal Scope As EnvDTE.vsBuildScope, ByVal Action As EnvDTE.vsBuildAction) Handles BuildEvents.OnBuildDone
If (Scope = EnvDTE.vsBuildScope.vsBuildScopeSolution)
//Do whatever solution independent stuff you need here.
If(DTE.Solution.FullName = "C:\My Solutions\Solution1.sln")
//Do whatever you need for Solution1.sln here.
End If
End If
End Sub