question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Building already built project results in 1 succeeded instead of 1 up-to-date

See original GitHub issue

Describe the bug

Given I have 1 project in solution without Costura.Fody installed When I build project for the first time Then It results in 1 succeeded project built And When I build the same project for the second time Then it results in 1 up-to-date project built

Given I have 1 project in solution with Costura.Fody installed When I build project for the first time Then It results in 1 succeeded project built And When I build the same project for the second time Then it results in 1 succeeded instead of 1 up-to-date project built

Minimal Repro

see Description

Submit a PR that fixes the bug

I have no idea where to start to fix this issue. I could try it, with some navigation from you.

Expected behavior

I would expect that consecutive builds without any changes to the project would result in 1 up-to-date build.

Additional context

When I set Output verbosity to ‘Normal’ in VS settings I get this build output:

1>------ Build started: Project: CP.LogAdapter, Configuration: Debug Any CPU ------
1>Build started 12.11.2018 8:07:01.
1>_HandlePackageFileConflicts:
1>GenerateTargetFrameworkMonikerAttribute:
1>Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
1>CoreCompile:
1>Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
1>FodyTarget:
1>Skipping target "FodyTarget" because all output files are up-to-date with respect to the input files.
1>_CopyAppConfigFile:
1>Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
1>CopyFilesToOutputDirectory:
1>  CP.LogAdapter -> c:\DokumentySVN\MEWProjects\MEW\CP.LogAdapter\bin\Debug\CP.LogAdapter.dll
1>
1>Build succeeded.
1>    0 Warning(s)
1>    0 Error(s)
1>
1>Time Elapsed 00:00:00.30
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

Here you can see that FodyTarget is skipped, because target is up-to-date, however step with Copying the resulting assembly is still made. By my understanding this is not necessary and this step should be skipped as well.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonCroppcommented, Feb 2, 2019

ok going with the suggestion from @jakubsuchybio

I think that Setting Copy Local to false manually on Costura or any other Fody weaver is sufficient workaround. It is old package referencing. It will be old and deprecated soon fingers crossed If I were you I wouldn’t fix this further.

1reaction
BrunoJuchlicommented, Jan 8, 2019

We’ve experienced the same symptoms. We’re still using Packages.config, too. We tracked it to:

1>Project ‘FOO.Bar’ is not up to date. CopyLocal reference ‘C:\dev\FOO\net\artifacts\Debug\Server\EmptyConstructor.dll’ is missing from output location.

… which we’ve worked around by:

image

(in words: modifying the *.csproj: adding <Private>False</Private> to the <Reference> of EmptyConstructor).

We’ve done this for all Fody plugins.


Updating to a newer version of the package will revert the change.


Our planned long-term fix is to migrate to package reference (can be done independently from moving to new csproj format). This improves other things for us, too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio 2019 Always Rebuilds Up-To-Date Projects
I have a WPF project that is several years old now but has been under intermittent development. I have never had any issues...
Read more >
Troubleshoot build performance with Build Analyzer
If you haven't already done so, build your app in one of the following ways: Click Build > Make Project from the menu...
Read more >
Build considers project "up-to-date" despite failed post- ...
When a post-build task fails (nonzero exit code), Visual Studio still considers the project "up-to-date" the next time the project is ...
Read more >
How to: Specify build events (C#) - Visual Studio (Windows)
In Solution Explorer, select the project for which you want to specify the build event. On the Project menu, click {ProjectName} Properties ...
Read more >
Git merge reports "Already up-to-date" though there is a ...
The message “Already up-to-date” means that all the changes from the branch you're trying to merge have already been merged to the branch ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found