If you’ve ever tried running a lambda expression in the Immediate Window or as a Watch, you’ll be pretty familiar with the response, “Expression cannot contain lambda expressions” (shown below in VS2012). If you try LINQ, you instead get “Expression cannot contain query expressions”, which is no better.
This changes in Visual Studio 2015, which adds debugger support for lambda expressions and LINQ. VS2015 happily runs lambdas in both the Immediate Window and as Watches:
LINQ works just as happily:
So there you go: another much-anticipated and extremely useful feature coming in Visual Studio 2015.



Hi,
i am still getting the error:
error CS1061: ‘…’ does not contain a definition for ‘Where’ and no extension method ‘Where’ accepting a first argument of type ‘…’ could be found (are you missing a using directive or an assembly reference?)
like in VS2013. Any Idea why?
do you have a “using System.Linq;”?
yes, i think its even per default included in every class in VS15 😉
Can you paste the code you’re trying to use? Maybe you’re giving it an invalid argument… I’m finding it strange that it’s complaining about the type of its first argument.