This project has moved. For the latest updates, please go here.

Unclear configuration

Sep 9, 2013 at 9:42 PM
I updated the nuget packet to 1.8.0 and since then I receive this exception:
In the `name` attribute of `/configuration/bundleTransformer/less/jsEngine` configuration element not specified a name of JavaScript engine.

If you have not installed JavaScript engine, then for correct working of this module is recommended to install one of the following NuGet packages:
 * JavaScriptEngineSwitcher.Msie
 * JavaScriptEngineSwitcher.V8

After package is installed, need set a name of JavaScript engine (for example, `MsieJsEngine`) to the `name` attribute of `/configuration/bundleTransformer/less/jsEngine` configuration element.
I did install the JavaScriptEngineSwitcher.Msie package from nuget, but I still get this error.

I use nuget so I don't have to make manual changes to web.config, but I am confused what and where I have to change things now.

Anyone can shine a light on this?
Coordinator
Sep 10, 2013 at 7:42 AM
Carefully read the error message, since it contains setup instructions: "After package is installed, need set a name of JavaScript engine (for example, MsieJsEngine) to the name attribute of /configuration/bundleTransformer/less/jsEngine configuration element."
Coordinator
Sep 10, 2013 at 7:45 AM
Edited Sep 10, 2013 at 7:48 AM
You need to make this setting only once:
<configuration>
  <bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd">
    ...
    <less>
      <jsEngine name="MsieJsEngine" />
    </less>
    ...
  </bundleTransformer>
</configuration>
With future updates of the BundleTransformer.Less, nothing specify it manually will not need.
Marked as answer by Taritsyn on 8/6/2014 at 1:04 AM
Aug 5, 2014 at 5:27 PM
Edited Aug 5, 2014 at 5:29 PM
I know this thread is a little old but I'm still seeing this error and it seems that I have it all set up correctly. Here are the pertinent bits from my web.config
sectionGroup name="bundleTransformer">
    <section name="core" type="BundleTransformer.Core.Configuration.CoreSettings, BundleTransformer.Core" />
    <section name="less" type="BundleTransformer.Less.Configuration.LessSettings, BundleTransformer.Less" />
    <section name="microsoftAjax" type="BundleTransformer.MicrosoftAjax.Configuration.MicrosoftAjaxSettings, BundleTransformer.MicrosoftAjax" />
</sectionGroup>

<sectionGroup name="jsEngineSwitcher">
    <section name="core" type="JavaScriptEngineSwitcher.Core.Configuration.CoreConfiguration, JavaScriptEngineSwitcher.Core" />
    <section name="msie" type="JavaScriptEngineSwitcher.Msie.Configuration.MsieConfiguration, JavaScriptEngineSwitcher.Msie" />
</sectionGroup>

<jsEngineSwitcher xmlns="http://tempuri.org/JavaScriptEngineSwitcher.Configuration.xsd">
    <core>
        <engines>
        <add name="MsieJsEngine" type="JavaScriptEngineSwitcher.Msie.MsieJsEngine, JavaScriptEngineSwitcher.Msie" />
     </engines>
    </core>
</jsEngineSwitcher>
Any help would be greatly appreciated. I've been updating our web project for MVC 5 and just ran into this after updating our NuGet Packages.
Coordinator
Aug 5, 2014 at 5:30 PM
Hello, Jimbo!

Describe error in more detail.
Aug 5, 2014 at 5:40 PM
Hey Taritsyn thank you for the super fast response. After updating the NuGet Package references for BundleTransformer and the JavaScriptEngineSwitcher, I'm seeing this error when trying to fire up our site:
Image

Bundle Transformer: Core is on version 1.9.11
Bundle Transformer: LESS is on version 1.9.11
Bundle Transformer: Microsoft Ajax is on version 1.9.6

JavaScript Engine Switcher for .Net Core is on version 1.1.3
JavaScript Engine Switcher for .Net MSIE is on version 1.1.11

MSIE JavaScript Engine for .NET is on version 1.4.4
If there is any other info that I can provide please let me know.
Aug 5, 2014 at 5:52 PM
I apologize I forgot this other part of the web.config.
<bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd">
    <core>
      <css defaultMinifier="MicrosoftAjaxCssMinifier">
        <minifiers>
          <add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" />
          <add name="MicrosoftAjaxCssMinifier" type="BundleTransformer.MicrosoftAjax.Minifiers.MicrosoftAjaxCssMinifier, BundleTransformer.MicrosoftAjax" />
        </minifiers>
        <translators>
          <add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" />
          <add name="LessTranslator" type="BundleTransformer.Less.Translators.LessTranslator, BundleTransformer.Less" />
        </translators>
        <postProcessors>
          <add name="UrlRewritingCssPostProcessor" type="BundleTransformer.Core.PostProcessors.UrlRewritingCssPostProcessor, BundleTransformer.Core" useInDebugMode="false" />
        </postProcessors>
        <fileExtensions>
          <add fileExtension=".css" assetTypeCode="Css" />
          <add fileExtension=".less" assetTypeCode="Less" />
        </fileExtensions>
      </css>
      <js defaultMinifier="MicrosoftAjaxJsMinifier">
        <minifiers>
          <add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" />
          <add name="MicrosoftAjaxJsMinifier" type="BundleTransformer.MicrosoftAjax.Minifiers.MicrosoftAjaxJsMinifier, BundleTransformer.MicrosoftAjax" />
        </minifiers>
        <translators>
          <add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" />
        </translators>
        <fileExtensions>
          <add fileExtension=".js" assetTypeCode="JavaScript" />
        </fileExtensions>
      </js>
    </core>
  </bundleTransformer>
Coordinator
Aug 5, 2014 at 5:55 PM
<configuration>
  <bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd">
    ...
    <less>
      <jsEngine name="MsieJsEngine" />
    </less>
    ...
  </bundleTransformer>
</configuration>
Aug 5, 2014 at 8:01 PM
Thank you very much. :-) I'm sorry for wasting your time, I thought I tried adding that before but I must have put it in the wrong spot in the <core> section.
Jan 28, 2015 at 9:43 AM
Edited Jan 28, 2015 at 9:45 AM
Hi,

I get this error on MVC 5.2.2.

1) error info
Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Unrecognized element 'less'.

Source Error: 


Line 151:        </fileExtensions>
Line 152:      </js>
Line 153:      <less>
Line 154:        <jsEngine name="MsieJsEngine" />
Line 155:      </less>
2) package info:
Bundle Transformer: Core is on version 1.9.40
Bundle Transformer: LESS is on version 1.9.42
Bundle Transformer: Microsoft Ajax is on version 1.9.34
JavaScript Engine Switcher for .Net Core is on version 1.2.0
JavaScript Engine Switcher for .Net MSIE is on version 1.2.2
MSIE JavaScript Engine for .NET is on version 1.5.1

3) web.config info:
Same as above (@JimboSchneider) plus the <less> tag.

I just can't find info on this error anywhere.
Coordinator
Jan 28, 2015 at 10:04 AM
Hello, Teeberryu!

Very similar to what is missing the section element for less:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
        ...
        <sectionGroup name="bundleTransformer">
            ...
            <section name="less" type="BundleTransformer.Less.Configuration.LessSettings, BundleTransformer.Less" />
            ...
        </sectionGroup>
        ...
    </configSections>
    ...
</configuration>
If so, then try to uninstall the BundleTransformer.Less package and install it again.
Jan 29, 2015 at 9:55 AM
Edited Jan 29, 2015 at 9:56 AM
Thank you Taritsyn for response.

I did tried your solution, but unfortunately the error persist.

I created a new VS 2013 project, TestBundleTransformer, which includes only the required packages (BundleTransformer & dependiences). Can you please have a look and run it? The error should pop up.
Coordinator
Jan 29, 2015 at 1:35 PM
The problem is that you have the less element is inside the core element. Even IntelliSense shows this error.

As an example, you can view the documentation.
Jan 29, 2015 at 1:56 PM
Thanks, I feel a little ashamed of myself :)