Skip to content

BeforeBuild/AfterBuild targets not honored. #7811

@brettfo

Description

@brettfo

Steps to reproduce

Requires a project with the following

...
  <Target Name="BeforeBuild">
    <Message Text="Some message." />
  </Target>
...

Then

dotnet restore
dotnet build

Expected behavior

I expect the BeforeBuild target to be executed. Even adding BeforeTargets="Build" doesn't work. Similarly for AfterBuild/DependsOnTargets="Build".

Actual behavior

The target isn't run.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-rc4-004771)

Product Information:
 Version:            1.0.0-rc4-004771
 Commit SHA-1 hash:  4228198f0e

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  14.04
 OS Platform: Linux
 RID:         ubuntu.14.04-x64
 Base Path:   /usr/share/dotnet/sdk/1.0.0-rc4-004771

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions