Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I converted a Visual Studio 2008 web site to a Visual Studio 2010 web site. Usually all .cs, .aspx and .designer.cs files were grouped together in the Solution Explorer. After the conversion the .designer.cs files are separately listed in the Solution Explorer. Why is this? Is there a way to fix it?

With my newly converted web site, the code behind of every page gives errors. The errors that I get are all the same and they state the following:
"'type' does not contain a definition for 'member' and no extension method 'name' accepting a first argument of type 'type' could be found (are you missing a using directive or an assembly reference?)." I strongly suspect that this error is related to what I explained above. Strangely, when I build the project it builds successfully, but after a while it shows those same errors again at design time. Any help on this?
Posted
Comments
Dalek Dave 15-Sep-10 4:40am    
Do not try to work out the logic of MS, it defeats the greatest of minds! :)
Hardus Lombaard 15-Sep-10 4:45am    
So you suggest that I should just continue with my work and ignore all this? I'm afraid that I might get problems in the future.

I think I figured out a solution to my problem. All I did was to delete all the .aspx.designer.cs files. Now I have no errors and the project builds successfully. :-D
 
Share this answer
 
Comments
Hardus Lombaard 15-Sep-10 8:07am    
Nope I was wrong - I still have all the errors, but the project builds successfully. This is very strange. Visual Studio reports 0 errors after a successful build, but then after a while and some activity it again reports the same errors. Don't know why. :(
aayu 15-Sep-10 8:13am    
well i think you should rename all because you have convert the file so it is not supporting try using it may it work....
Ok I got the solution, but it's not a quick one. Every page basically has to be redone. I created a new page for every one, just copied the code over and deleted the old pages. There - problem solved, but it took a while. :)
 
Share this answer
 
Comments
LloydA111 15-Sep-10 12:50pm    
When I used to use VS, I never bothered trying to use the conversion wizard to upgrade code to a newer version of VS, I just did what you did, copy the code manually!

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