I recently converted a VS2008 project to VS2010. An interesting probelm is that the project compiles and runs well in VS2008, however, when compiling in VS2010, errors occur:
“The type or namespace name could not be found (are you missing an assembly reference?)… ”
Wow, what does this mean?
A search in Google shows that there are a lot of different explanations, but it seems there is no one that works, at least for my case.
Finally, I got the trick:
In the project properties, change the Dotnet framework from 2.0,3.0 or 3.5 to 4, compile and run!
Happy coding!
Shoneen
October 6, 2010 at 4:43 pm
THANKS ! Worked for me.
Sasikumar
October 13, 2010 at 9:08 pm
hi,
i am developing a website which includes to get sqlserver database values into excel sheet. i got a coding but i unable to import the namespace SECURITY. will u help me for my problem..
regards
sasi
rick
November 23, 2010 at 5:51 pm
Hi
Check the .cs properties – change from content to compile.
Cheers
Rick
xinyustudio
November 23, 2010 at 8:06 pm
Rick, nice comment. Thanks!
baxxtab
December 18, 2010 at 7:22 am
Thank you!!! My problem was it defaulted to Framework 4.0 Client where my library was 4.0.
Thanks Microsoft for your half-hearted help.
citizhang
December 30, 2010 at 6:03 am
thank you!!! it saved me from trying to rebuild the whole solution!
Liam
January 14, 2011 at 7:55 am
Thank you! I almost chewed off my own arm trying to figure out why my reference wasn’t being picked up.
Tana
June 16, 2011 at 2:52 pm
It did not work with me
Fernando
July 20, 2011 at 3:16 am
Gracias, a mi me funciono
Windows Home x64
VS2010
MySQL Connector Net 6.4.3
Stuart
August 4, 2011 at 7:59 pm
Thanks!!!!
Guest
October 1, 2011 at 2:48 am
Thanks a lot.
Maria
November 2, 2011 at 11:05 pm
Also watch to make sure you don’t have the Client Profile option selected unless you intended to! It seems to be the default, and has caused me problems before
vnaresh
November 28, 2011 at 7:10 pm
still same error coming
xinyustudio
November 28, 2011 at 8:12 pm
What are the specific errors? Do the comments above all fail?
kismet
January 10, 2012 at 1:12 am
Thanks!
Ed.
January 26, 2012 at 10:06 am
Thanks! That did it.
Gnanasekaran
May 16, 2012 at 3:13 pm
Thank u very much, u my god