Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 11, 2013 04:49 PM by mmodrall
Feb 08, 2013 09:58 PM|LINK
I've got a VS2010 solution point at a website running under ASPNet 4.0. The code and the website run fine, but when I'm in VS and click Rebuild Solution, I get a spurious error message that flashes by "The type or namespace var could not be found."
Now, I do have a statement
var x = webService.GetData();
in my C# code, but that's legal with any framework > 2...
Aspnet_compiler builds the code without any complaints. I'm just wondering why VS is throwing this spurious exception... Any ideas?
Feb 11, 2013 04:49 PM|LINK
A few more things...
When I use Build Web Site, the compiler errors about the var usage don't flash by; they stay on the screen and it says Build failed. When I use Rebuild Web Site, the complaints flash by and then disappear.
Interestingly, Rebuild also produces a warning that Build does not:
The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: AjaxControlToolkit...
We had a very old version of AjaxControlToolkit, so I tried updating it. The last several releases have a very long list of version mismatches.