Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Risks in switching from 'Copy always' to 'Copy if newer'

In order to avoid rebuilding the libraries that have not been touched I'm changing Copy to Output Directory for some files from Copy always to Copy if newer in some c# projects.

The files whose setting is changed have their Build Action set to one of Content, Embedded Resource, or Resource.

What are the risks accompanied with this?

like image 816
tymtam Avatar asked Jan 23 '13 08:01

tymtam


People also ask

What does 'copy always' mean in a file?

- "Copy always" means "make sure I always have the most up to date version." - Because the build process may modify the file, the build process must be run to make sure you have the most up to date version of that file. As an alternative, "Copy if newer" won't force a rebuild.

What does it mean to copy only newer or modified files?

You can copy only newer or modified files by skipping identical files. This feature will make the copy process much quicker. It is useful if you are backing up your files to the same destination.

Why not just copy the file built previously?

Why not just copy the file built previously? Because the file built previously may have been modified (or created) by the build. The build process interprets "Copy Always" to mean "copy the file once the build has completed, so it's the most recent version."

What are the risks of printing/scanning and copying?

12 common risks of printing/scanning and copying Risk 1: Paper gets left on the printer or copier tray Risk 2: Everyone in the office, including visitors can copy or scan to email/folder or fax Risk 3: Anyone, including visitors, can access the scan to/print from USB function on MFDs


1 Answers

Besides this probably being obsolete (e.g. due to resources being embedded), the only risk I could think of right now would be the fact that you could use outdated files in case some program changes something without updating the file's timestamp (or modifying this timestamp). For example, you might do some local changes to a file, then revert its contents using some kind of file versioning system (like SVN or HG). It's then possible that Visual Studio won't notice the reverted file and it might not copy it.

like image 166
Mario Avatar answered Nov 15 '22 20:11

Mario