<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Compiler Error - Metadata file 'System.Collections.Generic.dll' could not be found in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Compiler-Error-Metadata-file-System-Collections-Generic-dll/m-p/110046#M49716</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having difficulties getting this to run, any help would be most appreciated:&lt;/P&gt;&lt;P&gt;Global Code in c#&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Collections.Generic;&lt;/P&gt;&lt;P&gt;public static class MinimumValuesCalculator&lt;BR /&gt;{&lt;BR /&gt;public static List&amp;lt;int&amp;gt; CalculateMinimumValues(List&amp;lt;int&amp;gt; inputValues, int totalValue)&lt;BR /&gt;{&lt;BR /&gt;List&amp;lt;int&amp;gt; usedValues = new List&amp;lt;int&amp;gt;();&lt;BR /&gt;int remainingValue = totalValue;&lt;/P&gt;&lt;P&gt;// Sort the input values in descending order&lt;BR /&gt;inputValues.Sort((a, b) =&amp;gt; b.CompareTo(a));&lt;/P&gt;&lt;P&gt;foreach (int value in inputValues)&lt;BR /&gt;{&lt;BR /&gt;if (value &amp;lt;= remainingValue)&lt;BR /&gt;{&lt;BR /&gt;// Add the value to the usedValues list&lt;BR /&gt;usedValues.Add(value);&lt;BR /&gt;// Subtract the value from the remainingValue&lt;BR /&gt;remainingValue -= value;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (remainingValue == 0)&lt;BR /&gt;{&lt;BR /&gt;// If the remainingValue becomes zero, we have found the minimum values&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// If remainingValue is not zero, it means it's not possible to make up the total value&lt;BR /&gt;if (remainingValue != 0)&lt;BR /&gt;{&lt;BR /&gt;usedValues.Clear(); // Clear the usedValues list&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return usedValues;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the Code Stage Code&lt;/P&gt;&lt;P&gt;List&amp;lt;int&amp;gt; inputValues = InputParameters["InputValues"].Value as List&amp;lt;int&amp;gt;;&lt;BR /&gt;int totalValue = Convert.ToInt32(InputParameters["TotalValue"].Value);&lt;/P&gt;&lt;P&gt;List&amp;lt;int&amp;gt; usedValues = MinimumValuesCalculator.CalculateMinimumValues(inputValues, totalValue);&lt;/P&gt;&lt;P&gt;OutputParameters["UsedValues"].Value = usedValues;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Apr 2024 11:02:43 GMT</pubDate>
    <dc:creator>PJNI</dc:creator>
    <dc:date>2024-04-30T11:02:43Z</dc:date>
    <item>
      <title>Compiler Error - Metadata file 'System.Collections.Generic.dll' could not be found</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Compiler-Error-Metadata-file-System-Collections-Generic-dll/m-p/110046#M49716</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having difficulties getting this to run, any help would be most appreciated:&lt;/P&gt;&lt;P&gt;Global Code in c#&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;using System;&lt;BR /&gt;using System.Linq;&lt;BR /&gt;using System.Collections.Generic;&lt;/P&gt;&lt;P&gt;public static class MinimumValuesCalculator&lt;BR /&gt;{&lt;BR /&gt;public static List&amp;lt;int&amp;gt; CalculateMinimumValues(List&amp;lt;int&amp;gt; inputValues, int totalValue)&lt;BR /&gt;{&lt;BR /&gt;List&amp;lt;int&amp;gt; usedValues = new List&amp;lt;int&amp;gt;();&lt;BR /&gt;int remainingValue = totalValue;&lt;/P&gt;&lt;P&gt;// Sort the input values in descending order&lt;BR /&gt;inputValues.Sort((a, b) =&amp;gt; b.CompareTo(a));&lt;/P&gt;&lt;P&gt;foreach (int value in inputValues)&lt;BR /&gt;{&lt;BR /&gt;if (value &amp;lt;= remainingValue)&lt;BR /&gt;{&lt;BR /&gt;// Add the value to the usedValues list&lt;BR /&gt;usedValues.Add(value);&lt;BR /&gt;// Subtract the value from the remainingValue&lt;BR /&gt;remainingValue -= value;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (remainingValue == 0)&lt;BR /&gt;{&lt;BR /&gt;// If the remainingValue becomes zero, we have found the minimum values&lt;BR /&gt;break;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;// If remainingValue is not zero, it means it's not possible to make up the total value&lt;BR /&gt;if (remainingValue != 0)&lt;BR /&gt;{&lt;BR /&gt;usedValues.Clear(); // Clear the usedValues list&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return usedValues;&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the Code Stage Code&lt;/P&gt;&lt;P&gt;List&amp;lt;int&amp;gt; inputValues = InputParameters["InputValues"].Value as List&amp;lt;int&amp;gt;;&lt;BR /&gt;int totalValue = Convert.ToInt32(InputParameters["TotalValue"].Value);&lt;/P&gt;&lt;P&gt;List&amp;lt;int&amp;gt; usedValues = MinimumValuesCalculator.CalculateMinimumValues(inputValues, totalValue);&lt;/P&gt;&lt;P&gt;OutputParameters["UsedValues"].Value = usedValues;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 11:02:43 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Compiler-Error-Metadata-file-System-Collections-Generic-dll/m-p/110046#M49716</guid>
      <dc:creator>PJNI</dc:creator>
      <dc:date>2024-04-30T11:02:43Z</dc:date>
    </item>
    <item>
      <title>Re: Compiler Error - Metadata file 'System.Collections.Generic.dll' could not be found</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Compiler-Error-Metadata-file-System-Collections-Generic-dll/m-p/110049#M49717</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 796px;"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/38044iCB76BB525639D9D6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2024 11:04:58 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Compiler-Error-Metadata-file-System-Collections-Generic-dll/m-p/110049#M49717</guid>
      <dc:creator>PJNI</dc:creator>
      <dc:date>2024-04-30T11:04:58Z</dc:date>
    </item>
  </channel>
</rss>

