WLP 6.9.20.7: New Editor has compiler error with LINQ methods
Author: psimmons
Creation Date: 7/12/2019 6:14 PM
profile picture

psimmons

#1
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.

profile picture

Eugene

#2
Thank you for reporting the issue. Apparently this is a high priority bug (not because of LINQ but its impact).
profile picture

Eugene

#3
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).
profile picture

psimmons

#4
Success! Thank you for the support. Phil
profile picture

Eugene

#5
Glad I could be of assistance.
profile picture

mwkidd1

#6
This post is a live saver.
profile picture

Panache

#7
Ditto. I just remembered that one of the strategies I trade uses LINQ when it didn't generate any signals this morning.
profile picture

Eugene

#8
The bug with System.Runtime.dll is expected to be fixed in a newer build like 6.9.21.
profile picture

ReneW

#9
Today I have come across this bug in the latest WL 6.9.22.7 during "Linq sorting" a list
by multiple criteria....
profile picture

Eugene

#10
Yes, this is already known from my post #5 from Dec 16 in this announcement thread:

Wealth-Lab Pro and Developer 6.9.22 are ready!

It was fixed in 6.9.21 and got reintroduced in .22 :(
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).