I am having a problem with font enhancement and ASP.NET optimization / layout.
If the EnableOptimizations parameter is set to false, the font that I use for the uploaded image works fine: 
However, if EnableOptimizations is set to true, the font is no longer found, and the following is displayed: 
Ive noticed that there is a mismatch between the paths that push GET requests:
EnableOptimizations = false: localhost: 3620 / Content / fonts / fontawesome-webfont.woff? v = 4.1.0 EnableOptimizations = true: localhost: 3620 / fonts / fontawesome-webfont.svg? V = 4.1.0
The node under consideration is as follows:
bundles.Add(new StyleBundle("~/Content/BootstrapAndFontAwesome").Include( "~/Content/bootstrap/bootstrapLabel.css", "~/Content/font-awesome/font-awesome.css" ));
What is going on here and what is the best way to fix it?
Greetings
Update
In the Rowan suggestion, in the comments on this post, I have implemented the following code from this https://stackoverflow.com/a/2129609/ which has fixed the problem on my dev machine:
public class CssRewriteUrlTransformWrapper : IItemTransform { public string Process(string includedVirtualPath, string input) { return new CssRewriteUrlTransform().Process("~" + VirtualPathUtility.ToAbsolute(includedVirtualPath), input); } }
I will need to do some practical deployments to make sure they are robust (like using IIS virtual directories, etc.). Looks nice!
Please note that I had to separate the font-awesome file into its own package, since it cannot be linked to another resource when making the CssRewriteUrlTransform decision.
Thanks.