问题
I have integrated (Twitter)Bootstrap to my ASP.NET MVC (4) application. In my source code I have the following fonts files:

When I publish my application only the .svg
file are being included in this fonts
folder.
I have also this img
folder being part of bootstrap:

All images files are being included when I publish my application.
So, how can I get VS2013 to copy those fonts files when publishing the application?
回答1:
A temporary solution,
Select your font files and Change Build action as Content from Properties Window. This fixes it in the immediate, but leaves you open to missing files in the future.
To permanently fix this issue this may help,
You can fix this permanently by modifying the default Build Action for font file extensions (.eot, .ttf, etc)
Visual-Studio-default-build-action-for-non-default-file-types
回答2:
I noticed that the "Precompile during publishing" checkbox in the "File Publish Options" in VS2017 prevented a *.lic file from being included in the deployment despite it being configured as "Content". A *.txt file did not have this problem, so I assume this has something to do with "unknown" file extensions. I'm not sure if this is specific to VS2017 or other versions also have this weird issue. Anyway thought I'd share this because it is very counter-intuitive, seems totally unrelated to that checkbox and might help somebody having similar issues.
来源:https://stackoverflow.com/questions/20563752/fonts-files-are-not-being-included-when-publishing-mvc-application-vs2013