0

I'm using fontawesome in one of my web applications. The problem is that not all of the fontawesome files that is contained withing my Content folder is published to the web server.

enter image description here

Is there any way that I can get these files to be published without having to manually copy them?

Andre Lombaard
  • 6,985
  • 13
  • 55
  • 96
  • It's a publishing issue or your server can't serve that mime types? Have you set the correct location http://stackoverflow.com/questions/14366158/font-awesome-not-working-in-chrome ? – Irvin Dominin Jul 04 '13 at 16:27
  • It looks like a publishing issue, there is 4 files in my fonts folder, only fontawesome-webfont.svg is published, when I manually copy the other 3 files to the web folder everything is working as expected – Andre Lombaard Jul 04 '13 at 16:48
  • Have you tried using another browser? Where is your Content folder located? Is it local? Or on a CDN? If it's the latter, and you're using IE you will likely have to configure your Cross-Origin Request Policy to allow loading of font-awesome icons from a remote location. [For CDN based problems ](http://stackoverflow.com/questions/12229844/amazon-s3-cors-cross-origin-resource-sharing-and-firefox-cross-domain-font-loa) Do your fonts load if you use the [Bootstrap hosted files](http://fortawesome.github.io/Font-Awesome/get-started/)? – gMok Jul 04 '13 at 16:34
  • Do you publish your site using Visual Studio? Any clue in the log of the publish? What is the build action defined for those files? – Irvin Dominin Jul 05 '13 at 13:29

2 Answers2

2

Please check the following.

1) check if the font files are in your project in visual studio (i.e. event the files are in the the project folders in Explorer doesn't mean it is in visual studio project, see if you can view it in your solution explorer)

2) if you can see it in your solution explorer, right click on it and see if you see an option called Include In Project. if you see this, click on it and it will include the file into your project. Instead, if you see Exclude from Project then it's in your project.

3) right click on the font file again and see if the Build Action property is set to Content.

Amila
  • 3,711
  • 3
  • 26
  • 42
1

This actually had nothing to do with the files not deploying. I'm using bundling and minification and unfortunately it seems that MVC bundles are not smart enough when it comes to virtual directories.

A quick fix was to create a physical directory with the files giving me a 404 error.

Andre Lombaard
  • 6,985
  • 13
  • 55
  • 96