13

I would like to clear one concept. In c#, when we build(or re-build) a solution, We sometimes get Build: 1 succeeded

and sometimes,

Build: 1 succeeded or up-to-date

Ok, I know that something in our code would be not as per logic when we get the latter ans.

But, what does it mean CONCEPTUALLY?

riQQ
  • 9,878
  • 7
  • 49
  • 66
Shachi
  • 1,858
  • 3
  • 23
  • 41
  • 1
    My guess is it means the "up-to-date" project didn't really need to be built since nothing has changed since the last build. – millimoose Feb 21 '13 at 13:05
  • possible duplicate of [What does visual studio use to determine that a build is up to date?](http://stackoverflow.com/questions/2140003/what-does-visual-studio-use-to-determine-that-a-build-is-up-to-date) – Mike Perrenoud Feb 21 '13 at 13:07

3 Answers3

10

Build: 1 succeeded in general refer to successful compilation of the solution with 1 project in it.

while

Build: 1 succeeded or up-to-date means that codes in the project within your solution has not changed, hence compilation was not needed. Hence, 1 Build Success or up-to-date

Parimal Raj
  • 20,189
  • 9
  • 73
  • 110
4

It means nothing has changed in the project. VS (well MSBUILD really), decides if it's up to date as follows:

From: How does MSBuild decide whether it needs to rebuild a C# library or not?

If you look in Microsoft.CSharp.targets (the msbuild file for compiling C# projects) the CoreCompile target has a set of Inputs and Outputs defined. These are used to do the dependency checking to see if CoreCompile needs to run. The list of inputs include the c# files, resource files, application icon, strong name key file, and other custom inputs you can define.

If you have a solution and run msbuild on it with diagnostic logging enabled (/v:diag command line parameter), you might see this message if the outputs are up to date:

Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.

The targets file is located in the .NET Framework directory (c:\windows\Microsoft.NET\Framework\v3.5 or v4.0.30319.

Community
  • 1
  • 1
Sam Shiles
  • 10,529
  • 9
  • 60
  • 72
0

An "up-to-date" project was previously built successfully, and hasn't changed since that time, so it isn't rebuilt.

Nathan
  • 31
  • 5