In VS, click Project (next to File,Edit,View), select Properties
then in Application tab (you'll notice you're already in 3.5), select the Target Framework to 2.0, then compile (it will error). then put it back again to 3.5, then compile again, the error will disappear
i think it is just a small glitch in Visual Studio, just fool the IDE :-)
Stupid if you may ask.
source: http://stackoverflow.com/questions/205644/error-when-using-extension-methods-in-c/383517#383517
And when clicking Update Service reference is a no joy undertaking; sometimes you have to remove the service reference, and then re-add it again. Sometimes you have to restart Visual Studio to make things take in effect, ah.. the dev's life! :-)
Another anecdote(from me, a colleague experienced it too), the first time one installed a nuget on his/her Visual Studio, his/her Visual Studio will become very slow. So when the colleague installed nuget on his Visual Studio for the first time, he noticed Visual Studio became very slow; and even he restarted Visual Studio, it's still very slow, I told him to restart his computer. Voila! his Visual Studio became snappy again.
First refuge of those who easily give up: http://stackoverflow.com/questions/205644/error-when-using-extension-methods-in-c/338452#338452
No comments:
Post a Comment