upgrade to MH 11.1

Hello,

i upgraded my MH QUANT 10.1 to 11.1 and since then the batch.script doesn't work for me, we are using a modified component.config, do you know where the error could be? This component.config worked with all 10 versions of masshunter (10,10.1 and 10.2)

Thank you.

  • We tried repair those frameworks but it give same error, like i said its working on MH 10.1 so we suspect maybe is something wrong with that 11.1 version. I will try change that language. We contact our local agilent service, but they dont have experiences with batch.script. The guy who created this, found no error. Thank you for your time.

  • is there any way I can see in the log where masshunter is looking for the csc.ex file?

  •  ,

    I'm not aware of any way to log this information from quant. I believe quant should be using the 4.x version. 

  • First of all, thank you for posting publicly, I had not noticed this interface feature of MassHunter Quant, it looks very useful.

    Were you able to get it working in 11.1?

    If you're allowed to share your "IScriptable" folder, I would be very interested in seeing an use example. I am University/Government employed in Denmark, if that helps regarding permissions. Slight smile

    I am aware it will not function fully on my machine, but csc.exe indicates some compiling failing at the initialization, and you don't seem to be referencing any internal dll, so I should get far enough that I might be able to reproduce or not, and if it doesn't fail on my machine, you can get a hint at what is wrong.

  • Hi, sorry i can't share our script, but i can share testing script for compilation purposes. It still doesn't work on MH 11.1, compilation of methods from IScriptableInterface does not work when uploading a batch. You must create IScriptable folder like this C:\MassHunter\Scripts\Quant\IScriptable\Batch_Script.txt"> and copy that batch_script.txt into , and copy component.config.xml here C:\Program Files\Agilent\MassHunter\Workstation\Quant\bin, make backup of that component.config.

    <?xml version="1.0" encoding="utf-8"?>
    <components>
      <defaultnamespace>Agilent.MassSpectrometry.DataAnalysis.Quantitative</defaultnamespace>
      <references>
        <reference framework="true" assembly="System.Data.dll"/>
        <reference framework="true" assembly="System.Data.DataSetExtensions.dll"/>
        <reference framework="true" assembly="System.Xml.dll"/>
        <reference framework="true" assembly="System.Web.Services.dll"/>
        <reference framework="false" assembly="Quantitation.dll"/>
        <reference framework="false" assembly="QuantUtils.dll"/>
        <reference framework="false" assembly="ScriptableInterfaces.dll"/>
        <reference framework="true" assembly="System.Linq.dll"/>
        <reference framework="true" assembly="System.Core.dll"/>
        <reference framework="true" assembly="System.Xml.Linq.dll"/>
        <reference framework="true" assembly="System.Windows.Forms.dll"/>
        <reference framework="true" assembly="System.Threading.Tasks.dll"/>
        <reference framework="true" assembly="System.Drawing.dll"/>
        <reference framework="true" assembly="System.Net.dll"/>
        <reference framework="true" assembly="System.IO.dll"/>
      </references>
      <interface name="IScriptableSample">
        <implementation assembly="CompoundMath_Script.dll">
          <script name="CompoundMath_Script.txt">
            <references>
              <reference framework="false" assembly="BatchAnalysis.dll"/>
            </references>
          </script>
        </implementation>
      </interface>
      <interface name="ICustomExpressions">
        <implementation assembly="C:\MassHunter\Scripts\Quant\IScriptable\CustomExpressions_Script.dll">
          <script name="C:\MassHunter\Scripts\Quant\IScriptable\CustomExpressions_Script.cs">
            <references>
            </references>
          </script>
        </implementation>
      </interface>
      <!--<interface name="IScriptableBatch">
        <implementation assembly="C:\MassHunter\Scripts\Quant\IScriptable\Batch_Script.dll">
          <script name="C:\MassHunter\Scripts\Quant\IScriptable\Batch_Script.txt">
            <references>
              <reference framework="false" assembly="BatchAnalysis.dll"/>
            </references>
          </script>
        </implementation>
      </interface>-->
      <interface name="IScriptableBatch">
        <implementation assembly="C:\MassHunter\Scripts\Quant\IScriptable\Batch_Script.dll">
          <script name="C:\MassHunter\Scripts\Quant\IScriptable\Batch_Script.txt">
            <references>
              <reference framework="false" assembly="BatchAnalysis.dll"/>
              <reference framework="true" assembly="System.Data.dll"/>
              <reference framework="true" assembly="System.Linq.dll"/>
              <!--<reference framework="true" assembly="System.Linq.Enumerable.dll"/>-->
              <reference framework="true" assembly="System.Data.DataSetExtensions.dll"/>
              <reference framework="true" assembly="System.Collections.dll"/>
              <reference framework="true" assembly="System.Xml.Linq.dll"/>
              <reference framework="true" assembly="System.IO.dll"/>
              <reference framework="true" assembly="System.Xml.dll"/>
              <reference framework="true" assembly="System.Core.dll"/>
              <reference framework="true" assembly="System.Threading.Tasks.dll"/>
              <reference framework="true" assembly="System.Net.dll"/>
            </references>
          </script>
        </implementation>
      </interface>
      <interface name="IScriptableOutlier" instanceName="Accuracy">
        <implementation assembly="OutlierAccuracy_Script.dll">
          <script name="OutlierAccuracy_Script.txt">
            <references>
            </references>
          </script>
        </implementation>
      </interface>
      <interface name="IScriptableSample">
        <implementation assembly="Sample_Script.dll">
          <script name="Sample_Script.txt">
            <references>
            </references>
          </script>
        </implementation>
      </interface>
      <interface name="IScriptableCompound">
        <implementation assembly="Compound_Script.dll">
          <script name="Compound_Script.txt">
            <references>
            </references>
          </script>
        </implementation>
      </interface>
      <interface name="IScriptableQuantifierIon">
        <implementation assembly="QuantifierIon_Script.dll">
          <script name="QuantifierIon_Script.txt">
            <references>
            </references>
          </script>
        </implementation>
      </interface>
      <interface name="IScriptableQualifierIon">
        <implementation assembly="QualifierIon_Script.dll">
          <script name="QualifierIon_Script.txt">
            <references>
            </references>
          </script>
        </implementation>
      </interface>
    </components>
    using System;
    using Agilent.MassSpectrometry.DataAnalysis.Quantitative;
    
    namespace ScriptTest
    {
        internal class Batch_Script
        {
        }
    
        public class ScriptableBatch : IScriptableBatch
        {
            public void _OnBatchAnalysisStarting(QuantitationDataSet dataSet, short batchId)
            {
                // ALS Implementation
            }
    
            public void _OnBatchAnalyzed(QuantitationDataSet dataSet, short batchId)
            {
                // ALS Implementation
            }
    
            public void _OnBatchLoaded(QuantitationDataSet dataSet, short batchId)
            {
                // ALS Implementation
            }
        }
    }

  • Thank you for sharing the testing script, I learned a lot, and I was able to get the same error as you in MH Quant v11.1 and no errors in MH Quant v10.2.

    It seems all .NET Framework 4.X should use "v4.0" as "CompilerVersion", as no other "4.X" is valid: see "system/codedom/compiler/RedistVersionInfo.cs" at the Microsoft Github (My original reply got flagged due to linking to GitHub, so I might have replied twice.)

    So I don't know of a way to fix this, as some Agilent code must be selecting an invalid "CompilerVersion". And unfortunately, only versions "v2.0" and "v3.5" performs a registry lookup, and they're likely using some 4.X as "howard_sanford" mentioned.

    It seems MH v12.0 is released or about to be released (MH Quant v11.1 has moved to "Previous Versions" on my subscribenet) - so hopefully someone actually tested this code, and fixed the issue. Slight smile

Was this helpful?