I've got many C# (Visual Studio 2008) projects and a few of them are updating the assembly even when there have been no changes (even when I choose Build and not Rebuild). Most of my projects don't do this, its just the odd few.
I have yet to find any difference between the projects and wondered if anyone had any ideas what could be influencing it. To be clear, I've not made any code changes before building but the assembly is still being recreated when I run the Build command within Visual Studio.
I'm sorry I can't provide any further details but please let me know if there is anything else that I can check that may shed some light.
Can anyone help? I've been tearing my hair out for a while on this.
Thanks, Alan
Actually Hans' now-deleted answer pointed me to the right direction. Cranking up MSBuild's verbosity to diagnostic told me that VS considered a project always out of date because one file had "Copy to output directory" set to "Copy always". And the other projects followed from that because they depended on that project an noticed that the newly-built DLL was newer than one of their own output files.
Changing "Copy to output directory" to "Copy if newer" resolved that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With