Build another project by prebuild event without adding reference

后端 未结 2 1877
醉酒成梦
醉酒成梦 2020-12-19 01:06

I am copying .exe file form a separate to my main project\'s folder on prebuild event but I need to build that project before build my main project so i want to build that p

2条回答
  •  被撕碎了的回忆
    2020-12-19 01:20

    This is what worked for me:

    "$(DevEnvDir)devenv" "$(SolutionDir)MySolution.sln" /Build $(configuration) /project "$(SolutionDir)MyProjectFolder\MyProject.csproj"
    

    Here $(DevEnvDir), $(SolutionDir), and $(configuration) are Visual Studio Macros, so this command will be translated into:

    "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv" "D:\Learning\MySolutionFolder\MySolutionName.sln" /Build Debug /project "D:\Learning\MySolutionFolder\MyProjectFolder\MyProject.csproj"
    

提交回复
热议问题