命令行返回工作空间的路径

时间:2014-09-21 05:49:16

标签: vb.net command-line wix

将VS2013与Add-Ins Express一起使用,Visual Studio WiX安装项目的Designer 项目属性>构建活动>发布构建事件命令行...

我希望返回工作区的路径。我写的是VB脚本。这是我的尝试,最后一行返回与第一行中设置的值相同的值。

  set str1=$(SolutionDir)
  set str2=$(SolutionName)\
  echo.%str1%
  echo.%str2%
  set str1=%str1:str2=%
  echo.%str1%

有谁可以建议我哪里出错了?

与此问题类似:Is there any macro to get the root directory of the TFS Sourcecontrol in Visual Studio?

1 个答案:

答案 0 :(得分:1)

在Ansgar的暗示之后我想出了这个

set str1=$(SolutionDir) 
set str1=%str1:$(SolutionName)\=% 
echo.%str1%