Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP MVC Less file gives: Exception has been thrown by the target of an invocation

I have a simple asp.net mvc 4 site that uses less files. When i run it on my local pc it works fine, but when i publish it to the server I get te following error:

During the output text content of processed asset an unknown error has occurred.
See more details:
Exception has been thrown by the target of an invocation.

stacktrace:

[HttpException (0x80004005): During the output text content of processed asset an unknown error has occurred.
See more details:
Exception has been thrown by the target of an invocation.]
   BundleTransformer.Core.HttpHandlers.AssetHandlerBase.ProcessRequest(HttpContextBase context) +1895
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165

For rendering the less files i use the BundleTransformer.Less and in the web.config i added in bundletransformer:

<less useNativeMinification="false" ieCompat="true" strictMath="false" strictUnits="false" dumpLineNumbers="None">
      <jsEngine name="V8JsEngine" />
    </less>
like image 883
Martijn Avatar asked Dec 06 '25 09:12

Martijn


1 Answers

Try to install the Visual C++ Redistributable Packages for Visual Studio 2013 on the server.

Note: older versions of the JavaScriptEngineSwitcher.V8 (before version 1.3.0) required the Visual C++ Redistributable for Visual Studio 2012.

like image 146
Andrey Taritsyn Avatar answered Dec 07 '25 22:12

Andrey Taritsyn