我有一个使用较少文件的简单 asp.net mvc 4 站点。 当我在我的本地电脑上运行它时它工作正常,但是当我将它发布到服务器时我得到以下错误:
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.
堆栈跟踪:
[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
为了渲染较少的文件,我使用 BundleTransformer.Less 在我添加的 web.config 中 在 bundletransformer 中:
<less useNativeMinification="false" ieCompat="true" strictMath="false" strictUnits="false" dumpLineNumbers="None">
<jsEngine name="V8JsEngine" />
</less>
最佳答案
尝试安装Visual C++ Redistributable Packages for Visual Studio 2013在服务器上。
注意:旧版本的 JavaScriptEngineSwitcher.V8(1.3.0 版之前)需要 Visual C++ Redistributable for Visual Studio 2012 .
关于c# - ASP MVC Less 文件给出 : Exception has been thrown by the target of an invocation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29647337/