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?

4
  • It's a publishing issue or your server can't serve that mime types? Have you set the correct location stackoverflow.com/questions/14366158/… ? Commented Jul 4, 2013 at 16:27
  • 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 ](stackoverflow.com/questions/12229844/…) Do your fonts load if you use the Bootstrap hosted files? <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/ Commented Jul 4, 2013 at 16:34
  • 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 Commented Jul 4, 2013 at 16:48
  • 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? Commented Jul 5, 2013 at 13:29

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.