After upgrading to Visual Studio 2013, I am seeing errors throughout one of my WCF Framework 4.0 projects. Wherever there is a LINQ entity query I am seeing this error upon using any LINQ function such as Any(), Single(), SingleOrDefault(), OrderBy() etc:
Error 3 The type arguments for method
'System.Linq.Enumerable.OrderBy<TSource,TKey>(System.Collections.Generic.IEnumerable<TSource>,
System.Func<TSource,TKey>)' cannot be inferred from the usage. Try
specifying the type arguments explicitly.
Example line of code generating the error:
xxxxXXXXXXStatusList = xxxXXXXXContainer.XXXXXXXStatus.OrderBy(a => a.Status).ToList();
As well as:
Error 42 Delegate
'System.Func<BusinessAccess.Entities.XXXPortal.XXXXXXXXInfo, int,
bool>' does not take 1 arguments
With example:
xxxxxxInfo = xxxXXXXXContainer.XXXXXList.Where(c => c.xxxxxxid.Equals(xxxxxxid)).Single();
Here is what I have tried:
Any ideas greatly appreciated. Clearly it's a referencing/compile configuration issue, but it's currently eluding me.
Many thanks for your time.
We found it internally. For anyone else seeing blanket problems with Intellisense, yet able to build successfully:
I hope that this helps out someone somewhere.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.