通过prebuild事件构建另一个项目,而无需添加引用 [英] Build another project by prebuild event without adding reference
问题描述
我在预构建事件中将.exe文件从一个单独的副本复制到主项目的文件夹中,但是我需要在构建主项目之前先构建该项目,因此我想在主项目的预构建事件中构建该项目.
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 project on prebuild event of my main project.
推荐答案
这并不是最好的解决方案,但是绝对可以满足您的需要:将以下内容放入构建前事件中
Not that this is the best solution, but it will definitely work for what you want to do: Put the below into your pre-build event
"$(VS100COMNTOOLS)..\IDE\devenv" "csproj location OR sln location" /Rebuild "configuration required if you have more than configuration ex: Debug|x64"
"$(VS100COMNTOOLS)..\IDE\devenv" "csproj location OR sln location" /Rebuild "configuration required if you have more than configuration ex: Debug|x64"
这篇关于通过prebuild事件构建另一个项目,而无需添加引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!