For WLP 6.9.20.7, the Linq Where method causes the compiler to fail with errors.
The following code fails:
CODE:
Please log in to see this code.
References has System.Core checked.
The compiler reports errors:
error CS0012 The type 'System.Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime.
error CS0012: The type 'System.Collections.Generic.IEnumerable'1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime.
error CS0012 The type 'System.ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime.
error CS0012: The type 'System.Collections.Generic.IReadOnlyList'1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime.
Given the error message I added System.Runtime as a using statement, and experimented with References selecting System.Runtime.Remoting and Serialization.Formatters.Soap, but no success.
Size:
Color:
Thank you for reporting the issue. Apparently this is a high priority bug (not because of LINQ but its impact).
Size:
Color:
The developer has suggested a workaround. Please add a reference to System.Runtime.dll. Click "References...", switch to "Other assemblies to reference...", click "Add a reference", find System.Runtime.dll in C:\windows\microsoft.net\framework64\v4.0.30319 (assuming 64-bit WLP).
System.Core should be enabled on the ".NET Framework" (and it already is as you said).
Size:
Color:
Success! Thank you for the support. Phil
Size:
Color:
Glad I could be of assistance.
Size:
Color:
This post is a live saver.
Size:
Color:
Ditto. I just remembered that one of the strategies I trade uses LINQ when it didn't generate any signals this morning.
Size:
Color:
The bug with System.Runtime.dll is expected to be fixed in a newer build like 6.9.21.
Size:
Color:
Today I have come across this bug in the latest WL 6.9.22.7 during "Linq sorting" a list
by multiple criteria....
Size:
Color:
Size:
Color: