0
我想使用BundleTransformer。我已經按照文檔中所述的所有步驟進行了操作,但仍然無法使用。BundleTransformer LibSass無法找到錯誤
我已經安裝:
- BundleTransformer.SassAndScss
- BundleTransformer.Autoprefixer
- LisSassHost
- LibSassHost.Native.win-64
- JavaScriptEngineSwitcher.V8
這是我的配置:
<bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd">
<autoprefixer cascade="true">
<jsEngine name="V8JsEngine" />
<browsers>
<add conditionalExpression="> 5%" />
<add conditionalExpression="last 2 versions" />
</browsers>
</autoprefixer>
<sassAndScss>
<includePaths>
<add path=""></add>
</includePaths>
</sassAndScss>
<core>
<css defaultPostProcessors="UrlRewritingCssPostProcessor,AutoprefixCssPostProcessor">
<translators>
<add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" />
<add name="SassAndScssTranslator" type="BundleTransformer.SassAndScss.Translators.SassAndScssTranslator, BundleTransformer.SassAndScss" />
</translators>
<postProcessors>
<add name="UrlRewritingCssPostProcessor" type="BundleTransformer.Core.PostProcessors.UrlRewritingCssPostProcessor, BundleTransformer.Core" useInDebugMode="false" />
<add name="AutoprefixCssPostProcessor" type="BundleTransformer.Autoprefixer.PostProcessors.AutoprefixCssPostProcessor, BundleTransformer.Autoprefixer" useInDebugMode="true" />
</postProcessors>
<minifiers>
<add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" />
</minifiers>
<fileExtensions>
<add fileExtension=".css" assetTypeCode="Css" />
<add fileExtension=".sass" assetTypeCode="Sass" />
<add fileExtension=".scss" assetTypeCode="Scss" />
</fileExtensions>
</css>
<js>
<translators>
<add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" />
</translators>
<minifiers>
<add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" />
</minifiers>
<fileExtensions>
<add fileExtension=".js" assetTypeCode="JavaScript" />
</fileExtensions>
</js>
</core>
</bundleTransformer>
和V8發動機的登記:
// JsEngineSwitcherConfig.js
public class JsEngineSwitcherConfig {
public static void Configure(JsEngineSwitcher engineSwitcher) {
engineSwitcher
.EngineFactories
.AddV8();
engineSwitcher.DefaultEngineName = V8JsEngine.EngineName;
}
}
// Global.asax
JsEngineSwitcherConfig.Configure(JsEngineSwitcher.Instance);
我覺得這事做:
爲了使LibSass主機正確工作,需要使用Visual C++ Redistributable中的msvcp140.dll程序集 Visual Studio 2015.
但是,我不知道如何要求該DLL。或者實際上我不知道真正的問題在哪裏,如果有人能幫忙,我會很感激。