Click here to Skip to main content
15,921,837 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
Hi all, I am ARUN,
My project is in .net 2.0(Visual Studio),I changed it to .net 4.0. After changing the project
to 4.0, I get around 800 errors. can some one tell me a breif idea why there is
so many errors.
* Thanks in Advance *
Posted
Updated 26-Jan-11 17:31pm
v2

Too bad. Now fix them! Next time program clearly, without a single warning.
Seriously: I never heard of such things. A huge mass of my codes converted from 2.0 without a single complain. You only could receive some "obsolete" warnings. You're doing something fundamentally wrong.

I hope you opened the same very project you created for .NET 2.0 and converted when opened with VS 2010? Are you sure all messages are compilation errors, not warnings? Could you isolate a minimalistic sample to show 2-3 errors and post it?

Thank you.
—SA
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 26-Jan-11 23:43pm    
@arunmj: Please don't post your samples as an "Answer" (a very usual misuse) -- put them as a revision of your original Question; all follow-up questions and messages put in comments ("Add comment" or reply icon).
--SA
arunmj 26-Jan-11 23:55pm    
the 90% of the bugs only says "does not not exist in correct context". I do understand that its due to missing of assemblies. and this could not happen in my case. here i have changed only the properties .
Sergey Alexandrovich Kryukov 27-Jan-11 0:01am    
That's better. If you started from project created with 2.0 and VS 2010 converted it, there should not be missing assemblies. Are those 3-rd party assemblies? Maybe you simply did not copy them properly (you copied you project in different place but not 3rd party assemblies or something). Another variant: did you put any assemblies to GAC? How you referenced one assembly in another: as executable (Add Reference / Browse) or as projects?
Sergey Alexandrovich Kryukov 27-Jan-11 0:05am    
Anyway, this is not "conversion 2.0 to 4.0", this is your structure.
Another question for you: did you "convert from 2.0 to 4.0"? I mean, did you comfortable with moving your code from one place to another, from one computer to another. If you never try, this can be a problem. In particular, you should never use a single absolute path anywhere.
Can you post a project file as plain text, to review?
Abhinav S 27-Jan-11 0:06am    
Good answer SAKryukov .
Run a .Net 4.0 program once to make sure VS2010 has been installed correctly.

Then as mentioned by SAKryukov earlier, open the .Net 2.0 project / solution in VS2010 and VS2010 should automatically do the conversion for you (a report will then be displayed to show all errors / issues faced during conversion).
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 27-Jan-11 0:09am    
Thanks for supporting my effort, Abhinav (a 5). See my latest comments to my Answer. This is surely a result of some kind of sloppiness. Even third party libraries could not present a problem. Someone already voting "3" -- for my answer, not too the question -- how expected!
Abhinav S 27-Jan-11 1:05am    
Saw your comment. The OP needs to post some more information here before we can help him any further.
Sergey Alexandrovich Kryukov 27-Jan-11 1:14am    
Yep, just waiting...
Member 3939495 12-Jun-12 6:14am    
No comment
Sergey Alexandrovich Kryukov 27-Jan-11 0:22am    
Ok, you receive "3" too, probably from a different member. What are they thinking?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900