Skip to content

Add hook to MSBuild for importing target after Directory.Build.props file #8876

@dsplaisted

Description

@dsplaisted

For the Artifacts Output Format, the .NET SDK needs to add MSBuild logic to be evaluated immediately after any Directory.Build.props file is imported. In order to do this, it is currently importing Directory.Build.props itself and disabling the import from the common targets: https://github.com/dotnet/sdk/blob/d1773f68a8bbdaa7e2228a7f2f8f0ac341dfd65b/src/Tasks/Microsoft.NET.Build.Tasks/sdk/Sdk.props#L37-L58

Instead of repeating the MSBuild logic in the SDK, we could add a hook to MSBuild to allow the SDK to specify a file to be imported directly after the Directory.Build.props file. Probably this would involve adding the following line here:

 <Import Project="$(AfterDirectoryBuildPropsImport)" Condition="$(AfterDirectoryBuildPropsImport) != ''" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions