I’m doing some work outside VS and i cannot understand why i keep getting the following error message in the c# scriptable component. I’m simply doing a select method on a list that would work in VS when using the GH SDK.
- Error (CS1061): ‘System.Collections.Generic.List’ does not contain a definition for ‘Select’ and no extension method ‘Select’ accepting a first argument of type ‘System.Collections.Generic.List’ could be found (are you missing a using directive or an assembly reference?) (line 67)
private void RunScript(List<string> x, ref object A)
{
List<string> l = new List<string>();
foreach (string str in x)
{
l.Add(str);
}
A = l.Select(v => v).ToList();
// A = new List<string> (x.Select(v => v).Distinct().ToList());
}