How does msbuild decide whether it needs to rebuild a C# library or not?

Posted by Peter Mounce on Stack Overflow See other posts from Stack Overflow or by Peter Mounce
Published on 2011-02-22T17:28:19Z Indexed on 2011/02/23 7:25 UTC
Read the original article Hit count: 198

Filed under:
|
|

Per subject, how does msbuild decide whether it needs to rebuild a library (ie, invoke csc), or not, when it is run against a C# project file? I imagine (but want to confirm):

  • If there's no output directory, rebuild (duh :) )
  • If a C# file has changed, rebuild
  • If an included file marked copy-always has changed, rebuild
    • or is it smart enough to not rebuild, but just copy the file to the existing output?
  • If an included file marked copy-if-newer has changed, rebuild
    • same question as above

© Stack Overflow or respective owner

Related posts about c#

Related posts about visual-studio