I am trying to optimize my work with VS by creating several macros. I currently have the following macros:
Public Sub ReleaseBuild() DTE.ExecuteCommand("Build.SolutionConfigurations", "Release") DTE.ExecuteCommand("Build.RebuildSolution") End Sub Public Sub DebugBuild() DTE.ExecuteCommand("Build.SolutionConfigurations", "Debug") DTE.ExecuteCommand("Build.RebuildSolution") End Sub
I want to clear the solution before rebuilding it. I have done this:
Public Sub ReleaseBuild() DTE.ExecuteCommand("Build.SolutionConfigurations", "Release") DTE.ExecuteCommand("Build.CleanSolution") DTE.ExecuteCommand("Build.RebuildSolution") End Sub Public Sub DebugBuild() DTE.ExecuteCommand("Build.SolutionConfigurations", "Debug") DTE.ExecuteCommand("Build.CleanSolution") DTE.ExecuteCommand("Build.RebuildSolution") End Sub
But I will get the error below:
alt text http://img23.imageshack.us/img23/2667/errorcb.png
I believe that cleanliness should be done first of all before restoration. I know that this can be done by running two separate macros, but I really want to achieve this with one click.
Regards,
Cyril
source share