Building already built project results in 1 succeeded instead of 1 up-to-date
See original GitHub issueDescribe 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:
- Created 5 years ago
- Comments:18 (12 by maintainers)

Top Related StackOverflow Question
ok going with the suggestion from @jakubsuchybio
We’ve experienced the same symptoms. We’re still using Packages.config, too. We tracked it to:
… which we’ve worked around by:
(in words: modifying the *.csproj: adding
<Private>False</Private>to the<Reference>ofEmptyConstructor).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.