Skip to content

Add support for Directory.Build.props #44

@samsmithnz

Description

@samsmithnz

This allows you to set variables at a top level, that are used in projects.

e.g.
Directory.Build.props

    <NetCoreTargetFramework>net6.0</NetCoreTargetFramework>
    <NetStandardTargetFramework>netstandard2.0</NetStandardTargetFramework>
    <NetFrameworkTargetFramework>net472</NetFrameworkTargetFramework>

a project file in a sub-directory

    <TargetFramework>$(NetCoreTargetFramework)</TargetFramework>

More details about how Directory.Build.props works in docs: https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2022

To solve:

  1. When a variable is detected, lookup the value in a parent directory via Directory.Build.props
  2. Use the variable value as the counter

or

  1. detect Directory.Build.props file.
  2. Save variables/state of file
  3. When a variable is found in a project file, in a sub-dir, attempt to substitute in the correct value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions