How to change which default files have content build property in visual studio
When adding PDF, CSV, etc. to the project I have to go to properties of each file and change the build action to Content.
Is there a way to change the list of extensions that are recognized in the project so that this happens when I automatically include the pdf or csv in my project.
Thanks,
a source to share
This blog post from Andre Loker describes the process in great detail. The relevant section looks like this:
In the registry, you can configure the default build action for the file type. However, instead of rooting the registry, we use a much better approach: pkgdef files ( good article on pkgdef files ). Basically, pkdef are configuration files like .reg files that define registry keys and values that are automatically merged into the correct location in the real registry. If pkgfile is removed, the changes will be automatically rolled back. This way, you can safely modify the registry without the risk of hacking anything - or at least undoing it easily.
But here's an example of what you need to install:
[$RootKey$\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\FileExtensions\.spark]
"DefaultBuildAction"="Content"
a source to share