Getting imports working with dotless and CssBundles

I was watching Single Page Apps with HTML5, Web API, Knockout and jQuery by John Papa on pluralsight and one of the pieces was sending compiled less files down using the bundling.

[gist id=3703799]

Unfortunately this did not work while using @import because the current directory was set to my IIS Express directory. After searching most suggestions were to use Directory.SetCurrentDirectory but didn’t really like that solution so this is what I decided on:

[gist id=3689144 ]