views:

422

answers:

2

I just upgraded to VS2008 Sp1, and I have a weird issue going on. I get a lot of errors from my code behind pages indicating that a control doesn't exist in the current context and I am also getting an errors that the pages do not have methods.

It seems like ide is trying to compile the c# code without compiling the aspx code.

The site runs fine via both IIS and Visual Web Developer, and in fact when I open up the code behind page, all the errors go away. Anyone have any idea why VS2008 SP1 is behaving this way?

I am using C#, and the Web Site project mode.

+1  A: 

Check to make sure you are targeting the correct version of the .NET Framework. You can view this in the properties of the Solution file.

VS2008 allows you to target multiple framework versions.

Also check the Web.config, I know there can be differences between VS Web Developer and VS Standard/Pro with the web config. Maybe copy a fresh web.config file into the project.

Dan
Targeting 3.5. It also seems like it complains about any of the controls...Login control, text boxes, custom components, third party components...
JoshBerke
Did you switch from a Web site to Web project?
Dan
Nope...I haven't tried that...I've grown quite comftorble with the web site over the last year, that I forgot how much I wanted to switch.
JoshBerke
If you did switch from Web site to Web project you could see some naming issues similar to what you are describing because of a lack of namespaces in code files.
Dan
yea but these are bogus errors...when i open up the files they go away. I think I found a KB article on my issue...must have been googling with the wrong keywords.
JoshBerke
A: 

There is a KB Article and Hotfix for what sounds like might be my issue. I'll test this and update my answer if it was my specific problem but the behavior matches. I need to improve my google skills..should have found this via google.

This patch resolved my issue, weird

JoshBerke