Import .targets file from command line in msbuild

后端 未结 4 2166
野性不改
野性不改 2021-02-15 02:23

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:24

    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

提交回复
热议问题