简体   繁体   中英

VS2008 “must implement” fake errors?

I have a VS 2008 VB.NET Solution, which is quite large. Every once in a while, if I take latest code from source control, I get hundreds of errors. These aren't real errors. They are all about classes not implementing functions/events from interfaces (which they DO implement).

"Class [class name] must implement [event or function name] for interface [interface name]"

I usually end up spending couple of hours doing a combination of: building/rebuilding the solution project by project, cleaning the solution, deleting everything locally, taking latest... etc. At some point, everything just magically builds. Does anyone have any idea what is causing this? Other people on my team experience this as well. I do not see any circular references.

Yes, I've been there.

The root of the problem is that some projects are trying to build and they are dependent on the dll's that other projects generate.

You can solve this by modifying the build order of your projects .

Once you do this, everything should work fine on the first build attempt after check out.

I've seen it as well.

I think it's related to some of the metadata/files Visual studio keeps around..my running theory is that VS isn't refreshing it's internal stuff when you do the latest pull from source control. Thus it tries to do a build, it thinks some files haven't been "updated" (thus it has an old intermediate object file lying around it uses instead) gets confused, and fails.

Generally doing a combination of Build->Clean Solution, Build->Build Solution solves it most of the time. I have, twice, had to blow away the entire build directory and pull a fresh copy from source control (Clearcase) and do a fresh build.

Edit: I have Clearcase integrated with VS2008, and do my checkouts/checkins/version history from within VS2008. Not sure if using the standalone windows tool would solve this issue, and haven't the time to test (not to mention being unable to reproduce the error consistantly)

Edit2: When i say twice, i mean twice in the last 12 months or so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM