简体   繁体   中英

Cross platform build script that can call MSBuild or Xbuild depending on environment?

I have a simple .Net console app which has only framework dependencies. It can compile fine with either MSBuild on windows or Mono/XBuild on linux. It is part of a larger project, which has a python build script. Is there any simple way to determine the most suitable build engine (msbuild/xbuild) and use that?

In other words, I have a 'build.py' and I want that to call xbuild or msbuild as needed.

Far easier would be to write a small shell script for Linux or OSX that ran xbuild but was called msbuild. The arguments are the same I think.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM