Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet build rebuilds every time when the project contains a pre/post-compile script and incremental build gets disabled #6936

Closed
prochan2 opened this issue Oct 7, 2016 · 1 comment

Comments

@prochan2
Copy link

prochan2 commented Oct 7, 2016

Steps to reproduce

  1. Create a new console (or any other) .NET Core app. (dotnet new)
  2. Add any postcompile script to project.json.
  3. Run dotnet build twice.

Expected behavior

  1. First run of dotnet build builds the project.
  2. Second run of dotnet build says `Project {project name} was previously compiled. Skipping compilation.

Actual behavior

Both runs of dotnet build rebuild the whole project.

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.0-preview2-003133)

Product Information:
Version: 1.0.0-preview2-003133
Commit SHA-1 hash: 74df065

Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64

Notes

Let's say that the post-compile script does not do any change which would affect the incremental build. Wouldn't it be better to allow adding a flag to the script telling that the script is "incremental build friendly"?

@blackdwarf
Copy link

This was by design in Preview 2 I believe. https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-build has all of the details.

In the MSBuild world, this is not applicable since MSBuild has a different way of providing post-target extensibility. With that, I will close this issue.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@msftgits msftgits added this to the 1.0.0-preview3 milestone Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants