Import .targets file from command line in msbuild

后端 未结 4 1672
心在旅途
心在旅途 2021-02-15 02:44

I currently have multiple projects being build using msbuild. I have a small customisation to the build that is handled by a .targets file. One solution is to add the snippet

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-15 03:15

    Starting from MSBuild 15.0, the following two files are auto-imported into your build in case they are found on the project path or in any parent folder on the path to the root directory:

    • Directory.Build.props
    • Directory.Build.targets

    Remark: once the props or targets file is found, MSBuild will stop looking for a parent one.

    Also see: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build

提交回复
热议问题