When adding a PDF, CSV, etc... to 开发者_StackOverflowa project I have to go to the properties of every file and change the build action to Content.
Is there a way to change the list of extensions that are recognized in a project so that this will happen when I include a pdf or csv in my project automatically.
Thanks,
This blog post by Andre Loker describes the process in great detail. The relevant section appears to be this:
The default build action of a file type can be configured in the registry. However, instead of hacking the registry manually, we use a much better approach: pkgdef files (a good article about pkgdef files). In essence, pkdef are configuration files similar to .reg files that define registry keys and values that are automatically merged into the correct location in the real registry. If the pkgfile is removed, the changes are automatically undone. Thus, you can safely modify the registry without the danger of breaking anything – or at least, it’s easy to undo the damage.
But here's an example of what you need to set:
[$RootKey$\Projects\{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\FileExtensions\.spark]
"DefaultBuildAction"="Content"
精彩评论