Build vs Rebuild project in XIDE

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
OhioJoe
Posts: 131
Joined: Wed Nov 22, 2017 12:51 pm
Location: United States

Build vs Rebuild project in XIDE

Post by OhioJoe »

Specifically, when should we use one rather than the other? I've been using Rebuild every time just to make sure I'm catching all the code changes but it appears that Build allows you to recompile only the changed modules. Which means I can trust it to rebuild only where necessary. Am I correct?

(By the way, there should be a section entitled Dumb Questions. Saves me the trouble of having to decide where to post mine.)
Joe Curran
Ohio USA
User avatar
Chris
Posts: 4907
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Build vs Rebuild project in XIDE

Post by Chris »

Hi Joe,

There's no such thing as dumb questions! :)

Indeed, it's as you say, simple "Build" tries to be smart and compiles only the libraries that you have modified directly or indirectly since their were last compiled. "Rebuild" does compile everything.

I suggest almost always using simple Build instead of Rebuild, since this will save you compilation time. Actually in 95% of the times you do not even need Build at all, a simple "Compile" of the current library you are editing will be absolutely enough. Build is necessary only if you have changed something in the public interface of a library, for example if you added, deleted or modified the parameters of a public method, created a new class etc. If you are simply modifying the contents of a method for example, then both Build and Rebuild are useless and a complete waste of time.

Rebuild all is meant to be used only in the case when you think something is not working well, or when you want to force a recompile of everything so that all dlls have similar time stamps, or you have installed a new X# build so you need to force recompiling everything with the latest compiler.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply