Getting IIS "There's a duplicate error" after installing BundleTransformer.UglifyJs

0

I want to use UglifyJS's minifcation instead of Microsoft's standard one, so I've installed BundleTransformer.UglifyJs NuGet package. But after installing that package and rebuilding my app I get an IIS error with code 0x800700b7 and error text There's a duplicate of "bundleTransformer/core".

As I see, two new sections appeared in Web.config:

  <configSections>
        <sectionGroup name="bundleTransformer">
            <section name="core" type="BundleTransformer.Core.Configuration.CoreSettings, BundleTransformer.Core" />
        <section name="uglify" type="BundleTransformer.UglifyJs.Configuration.UglifySettings, BundleTransformer.UglifyJs" /></sectionGroup>
    </configSections>

And

      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
<bundleTransformer xmlns="http://tempuri.org/BundleTransformer.Configuration.xsd">
        <core>
            <css>
                <translators>
                    <add name="NullTranslator" type="BundleTransformer.Core.Translators.NullTranslator, BundleTransformer.Core" enabled="false" />
                </translators>
                <postProcessors>
                    <add name="UrlRewritingCssPostProcessor" type="BundleTransformer.Core.PostProcessors.UrlRewritingCssPostProcessor, BundleTransformer.Core" useInDebugMode="false" />
                </postProcessors>
                <minifiers>
                    <add name="NullMinifier" type="BundleTransformer.Core.Minifiers.NullMinifier, BundleTransformer.Core" />
                </minifiers>
                <fileExtensions>
                    <add fileExtension=".css" assetTypeCode="Css" />
                </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" />
                <add name="UglifyJsMinifier" type="BundleTransformer.UglifyJs.Minifiers.UglifyJsMinifier, BundleTransformer.UglifyJs" /></minifiers>
                <fileExtensions>
                    <add fileExtension=".js" assetTypeCode="JavaScript" />
                </fileExtensions>
            </js>
        </core>
    </bundleTransformer>    

I can't find any other pieces of Web.config containing bundleTransformer or core. What's wrong with my webapp's configuration?

asp.net
uglifyjs
bundletransformer
asked on Stack Overflow Mar 10, 2019 by michaeluskov

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0