jetheredge / SquishIt

Lets you *easily* bundle some css and javascript! Check out the Google group if you have questions!
http://groups.google.com/group/squishit
MIT License
459 stars 119 forks source link

Root Path (~) not working on Helios #306

Open JCKodel opened 9 years ago

JCKodel commented 9 years ago

I'm using Helios (Microsoft.AspNet.Loader.IIS), with this code on DefaultNancyBootstrapper:

`Bundle.JavaScript() .Add("~/Scripts/JavaScript1.js") .Add("~/Scripts/JavaScript2.js") .AsCached("JavaScripts", "~/Bundles/JavaScript");'

And Helios give me this error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\IIS Express\Scripts\JavaScript1.js'.

My mistake or SquishIt is not compatible with NancyFX running on Helios (not using MVC nor System.Web)?

AlexCuse commented 9 years ago

I am not very familiar with Nancy but I have looked into it - I think you need to define a root path provider for SquishIt if you haven't. This post details my most recent attempt to get things working - if you need to make any change with later versions I'd love to hear about it, we get these issues popping up on the mailing list from time to time and I'm not really familiar enough with nancy to be very helpful.

http://blogs.lessthandot.com/index.php/webdev/serverprogramming/squishit-and-nancy-part-deux/

https://github.com/AlexCuse/SquishIt.NancySample