ProjectScaffold icon indicating copy to clipboard operation
ProjectScaffold copied to clipboard

Why used Rebuild task instead Build in build.template file?

Open Chicker opened this issue 8 years ago • 2 comments

Hi, all!

Maybe answer will be obvious, but I can't understand why in the target Build in the file build.template, used task Rebuild instead Build for build solution (project).

As far as I know, only Build task allows incremental build that gives us the big boost in the build speed.

Chicker avatar Jun 10 '16 18:06 Chicker

Good question. I don't have the answer, but here's my thoughts.

Maybe rebuild is considered more "safe", and I was OK with that before I started using ionide plugins to build from my editor.

These days, I think the default should be build (incremental) unless you are doing a release (where perhaps rebuild is more appropriate).

adamchester avatar Jun 10 '16 18:06 adamchester

About the task Rebuild in MSDN documentation says: initially, will delete all temporary files and artifacts, and then will build the project, include recompilation of all the source files.

In practice, in most cases, it is recommended to run Build project as it runs much faster. And just in case "strange" errors when building, it is recommended to try Rebuild, because temporary files are cleared, due to which the project could fail build.

So, in my opinion, would be perfect to make the following changes:

  1. In the target Build to set the task to Build. In 99% of cases, it will be OK and faster.
  2. Add the target Rebuild, where to set the taskRebuild.

Actually, it is done in MS Visual Studio, where we have two items in the application build menu.

If there is no objection, I can make a PR.

Chicker avatar Jun 11 '16 06:06 Chicker