As I understand it, a plain ol\' \"~/foo\" path is supposed to work like @Url.Content(\"~/\") in MVC 4. However, I\'m trying to do this and getting many broken paths -- the
This could be as a result of a bug in Razor V2, where an apostrophe / single quote in an HTML comment breaks resolution of ~ paths.
The workaround is to use Razor comments instead of HTML comments. I.e., replace with @* Here's your comment *@.
Sorry this is a long shot, as I've no idea if you have HTML comments, let alone ones containing single quotes.