Reputation:
I often get in a position when I need to know why my LINQ doesnt work as intended... I use object collections and extensions.
I dont want spend more than couple of minutes on it. LINQ supposed to make developer's life easier not harder.
I hoped VS 2010 will have it fixed but I now use RC and it still doesnt let me type LINQ and check what is going on... Says as before "Expression cannot contain lambda expressions"...
Is there some add-on for Visual Studio so I can quickly and effectively run ad-hoc queries and find out what is going on and where I am wrong?
Upvotes: 12
Views: 7973
Reputation: 11827
VS 2010 isn't going to address this..
There is, in fact, such a plugin as you describe, but unfortunately it is highly expiremental. You will probably need to install VS2008 SDK and the Service Packs to get it to work - I know I did..
Here is the link: http://extendedimmediatewin.codeplex.com/
Upvotes: 1
Reputation: 630389
It's not a VS plugin, but it's free and it's awesome: LinqPad
You can run whatever linq or code snippet in general, just give it a look, it's an incredibly useful tool, for linq and more.
Upvotes: 5
Reputation: 102408
Have you tried this?
Debugging LINQ queries can be problematic. One of the reasons is that quite often, you write a large query as a single expression, and you can’t set a breakpoint mid-expression. Writing large queries in expression context is particularly powerful when using functional construction to form XML (or using the strongly typed DOM in Open XML SDK V2). This post presents a little trick that makes it easier to use the debugger with LINQ queries that are written using ‘method syntax’.
Upvotes: 5