Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between 1 succeeded and 1 succeeded or up-to-date in c#

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?

like image 243
Shachi Avatar asked Feb 21 '13 13:02

Shachi


People also ask

What is build up to date?

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

What is the latest version of Visual Studio 2022?

Visual Studio 2022 Blog Visual Studio 2022 version 17.4 is Available Today!

What is the most recent version of Visual Studio?

Visual Studio 2022 version 17.4 P1 is Available now ! Visual Studio 2022 version 17.3 is Available now!


2 Answers

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

like image 131
Parimal Raj Avatar answered Oct 24 '22 12:10

Parimal Raj


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.

like image 44
Sam Shiles Avatar answered Oct 24 '22 11:10

Sam Shiles