build only what is needed

  • Thread starter Thread starter interuser
  • Start date Start date
I

interuser

Hi
I use .net 2002 framework 1.0
I have a huge .net solution consisting of many projects. Depending on
the case, each time I change different project(s)
It is extremely time consuming to build all projects every time I want
to debug. Isn't there a switch somewhere to tell .net to build only
what has been changed since last build?
 
Hello,

If you use "Build Solution" (CTRL+SHIFT+B) from the Build menu, then
only projects which has been altered will be recompiled. I do belive that
this
is the case then you start a project (F5) as well. You have to explicitly
select
Rebuild Solution to recompile projects which has not been altered.

Hope this helps,

//Andreas
 
"Build Solution" builds everything.
Isn't there a switch somewhere to tell .net to build only what has changed?
 
"Build Solution" builds everything.
Isn't there a switch somewhere to tell .net to build only what has
changed?

The default is to rebuild only what needs to be built. This includes
projects that
have changed, but also projects that depend on (=reference) those changed
projects and probably also projects that depend on those (etc).

The reason is that a change in a "lower" project could affect the higher
ones,
so that needs to be checked by recompiling.

So, if you only change a top-level project, only that needs to be
recompiled.
If, on the other hand, you change a deep-down library project that is used
everywhere, then everything will be recompiled.

Hans Kesting
 
Hans Kesting said:
changed?

The default is to rebuild only what needs to be built. This includes
projects that
have changed, but also projects that depend on (=reference) those changed
projects and probably also projects that depend on those (etc).

The reason is that a change in a "lower" project could affect the higher
ones,
so that needs to be checked by recompiling.

So, if you only change a top-level project, only that needs to be
recompiled.
If, on the other hand, you change a deep-down library project that is used
everywhere, then everything will be recompiled.

Hans Kesting

If .net were clever enough, it would rebuild the dependent projects
only when required: eg when the public method declarations change (and
not the content)
Let's hope this will happen sometime in the near future
 
If .net were clever enough, it would rebuild the dependent projects
only when required: eg when the public method declarations change (and
not the content)
Let's hope this will happen sometime in the near future

What if the public methods don't change, but the private functions that the
public methods use do? You still need to recompile!

-mdb
 
Michael Bray said:
What if the public methods don't change, but the private functions that the
public methods use do? You still need to recompile!

You shouldn't need to. The IL for the calling code should be exactly
the same. (I seem to remember there's some hinting information for
finding members, and *that* may change, but it would be reasonable
enough to only rebuild for that purpose in release builds.)
 
Michael Bray said:
What if the public methods don't change, but the private functions that the
public methods use do? You still need to recompile!

-mdb

That's what I am saying! COmpile only what is needed, and not the
dependencies if the interface has not changed. Simple
 
Back
Top