4
我試圖用VS創建一些宏來優化我的工作。目前我有以下宏:Visual Studio:用一個宏清理並重建
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
我想要的是在實際重建它之前清理解決方案。我所做的是:
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
但我得到的錯誤波紋管:
alt text http://img23.imageshack.us/img23/2667/errorcb.png
我相信乾淨已經被重建之前,首先完成。我知道這可以通過運行兩個單獨的宏來完成,但我實際上只需點擊一下即可實現。
最好的問候,
基里爾
已經rebuild命令做了清潔第一。 – 2010-02-01 13:48:57
如何將您的問題標記爲答案? – 2010-02-02 11:53:04