I want to use the SquishIt nuget package inside and MVC3 application that is running on Windows Azure. I'm using SquishIt for CSS and JS combination and minification.
In my Views/Shares/_Layout.cshtml I have the following lines:
@MvcHtmlString.Create(
Bundle
.Css()
.Add("~/Content/templates/style.css")
.Add("~/Content/market.css")
.Add("~/Content/jquery-ui-theme/jquery-ui-1.8.17.custom.css")
.ForceRelease()
.Render("/Cache/combined-css_#.css"))
This results in an
"System.IO.IOException: Unable to open file"
I found something here http://www.bondigeek.com/blog/2011/03/22/all-is-quiet-not-on-the-azure-front/ but this is actually not what I want. In general it should be possible for SquishIt to write on the disk of the Azure VM, but probably the directory is wrong or the security rights are insufficient. Any idea?
In Azure VM, you cannot write to file system directly. You have to configure SquishIt to keep bundles in memory.
See this page for more details: Using SquishIt programmatically without the file system