0

I want to create a style bundle with following virtual path (plugin framework):

"~/Areas/Domain.PluginTest.Wui/Bundles/PluginCss"

When I go to that path I get an error stating that the file doesn't exist. The Static file handler is trying to find a file. How can I make this work with bundling?

System.Web.HttpException
Message:

File does not exist.
Stack trace:

at System.Web.StaticFileHandler.GetFileInfo(String 
virtualPathWithPathInfo, String physicalPath, HttpResponse response) at 
System.Web.StaticFileHandler.ProcessRequestInternal(HttpContext context, String 
overrideVirtualPath) at System.Web.DefaultHttpHandler.BeginProcessRequest(HttpContext 
context, AsyncCallback callback, Object state) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.
HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, 
Boolean& completedSynchronously)
Tommy
  • 39,592
  • 10
  • 90
  • 121
stephan.peters
  • 963
  • 13
  • 35

1 Answers1

0

The bundler is trying to find your path ~/Areas/Domain.PluginTest.Wui/Bundles/PluginCss, which doesn't exist. This is why we generally prefix bundle paths with bundles

bundles.Add(new StyleBundle("~/bundles/Areas/Domain.PluginTest.Wui/Bundles/PluginCss")
       .Include());
Colin Bacon
  • 15,436
  • 7
  • 52
  • 72