Can anyone help me here, the following works fine on my xp but not my vista machine. Im querying a Generic dictionary.
Both computers have .NET 3.5 + SP1, 3.0, 2.0, etc., and have the web project targeted to 3.5 Framework.
using System.Linq;
string val = "Test";
var d = DictionaryOfStuff().Where(n => n.Key.ToLower().Contains(val.ToLower()));
Gives me the error: CS1525: Invalid expression term '>'
I can run this in a differnet project on vista, I have IIS configured to use .NET 2.0 and the project in VS targeted at 3.5 I have even tried adding this to the web.config, it compiles fine w/o any lambda/linq
Well, here was the answer..
I changed the project to target .NET 3.0, tried to compile got all kinds of errors, changed it back to 3.5 and it compiled fine.
I musta had an old reference in there from something.
Based on the error message, I would have to say there is a configuration issue on your Vista machine and the web projects are using the 2.0 compiler instead of the 3.5 compiler. This is the only reason I can think of that you would get this message.
Make sure that
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With