Reputation: 145
I have noticed that setting the "Copy to Output Directory" property on a ResourceDictionary file to "Copy if newer" or "Copy always" causes the application to build everytime I run the application, even though I haven't made any changes since the last build. Setting the property to "Do not copy" only triggers a rebuild when changes have been made.
Having only a faint idea of the use cases for these different options I'm wondering what the implications might be setting the flag to "Do not copy"? The default is "Copy if newer" but I can't see that it makes any difference setting it to "Do not copy" - except for said build issue.
Upvotes: 0
Views: 74
Reputation: 65586
"Copy to Output Directory" is one of the most misunderstood and misused file properties.
When you build the project it will create an assembly (usually an exe but sometimes a DLL) and put it in the output folder. It will also include any other files the assembly needs in that folder. This will normally be copies of included libraries and a manifest. If you need to distribute any other files with your assembly, such as config files, a database, or some images then you can copy them to the output folder too.
For anything that is compiled or embedded into the app there is no need to copy the file to the output directory as well.
There is no need to copy a ResourceDictionary to the output directory of your app.
Upvotes: 4