views:

32

answers:

3

Visual Studio 2008 shows a lot of erroneous errors when building a website (not a web project) in the errors list. These errors are usually corrected (removed) when I rebuild the site a couple times but they cost me wasted time.

Is there anyway to hide the erroneous errors?

Update: I've decided to look into this to see if I could reproduce it. This is the exact behavior I am seeing, using the website model, I type some invalid syntax on a page. The errors list fills up with errors. I correct the error and the errors list does not update. I build the project and the errors list still shows the errors but the build shows as build completed. I build the project a second time and the errors list is cleared.

My question is there anyway to make the errors list clear on the first build? I thought it might have something to do with page build vs website build but it seems to make no difference. I am not using any third party dlls on this website.

+1  A: 

This probably has to do with the way you reference your projects. If you are referencing them as DLLs instead of projects, after a clean you will get missing reference/undef. symbols errors until you build them.

Alex
A: 

Without knowing what errors your are getting, this sounds maybe like you have some web server controls that are in a seperate project, and the order in which the projects are being compiled is causing the errors. I.e. the main project is compiled, generates errors because it can't find web controls or other dependencies, and then the other projects are compiled, so that when you compile the second time the dependencies exist and the main project compiles successfully.

Edit: When you right click the Solution(not the project) in solution explorer, and choose Properties, there is a Project Dependencies page that lets you specify the dependencies of each project. Make sure that this is accurate in terms of what is using what. Also be wary of circular dependencies.

AaronLS
+1  A: 

I can't be sure that this is your case, but I have seen this be done before when you have multiple projects in your solution that have references to one another. When doing so, your build order must be correct. If this is the case, right-click on your solution in the Solution Explorer and select "Project Dependencies..." and make sure this looks right.

Jaxidian
@Jaxidian Ah +1 you beat me to it while I was opening VS and editing.
AaronLS
@AaronLS: I already had 6 instances of VS open. ;-)
Jaxidian
@Jaxidian Lucky you I have been stuck in SQL mode for weeks :(
AaronLS