简体   繁体   中英

vs2008 c# project painfully slow

my largest C# VS2008 project recently became painfully slow. The moment I start typing, it takes up 100% of one of my CPUs. Building which (until recently) was very fast now takes much longer. I have disabled all add ins, cleaned the solution and still it is crawling. There is noticeable lag when I type and especially when I delete. I have also restarted numerous times. This is cutting my productivity by quite a bit, so if anyone has any ideas, I would really appreciate the help.

EDIT: Sorry, this is VS2008 SP1

I noticed this part:

There is noticeable lag when I type

And that makes me think intellisense. Combine that with this:

Building which (until recently) was very fast now takes much longer.

...and my psychic debugging powers tell me you likely somehow have a circular or recursive reference in your project that it can't resolve quickly.

By that I mean, Type A depends on Type B to compile which depends on Type C which in turns depends on Type A. Normally this isn't supposed to happen, but for example if 'A' has a strong name and you're referencing two different versions of the same library somewhere, Visual Studio might get confused.

Do you have something like codeRush installed or other plugins? If so disable all the plugins.

Have you tried opening the solution on a "clean" Visual Studio install?

Another thing that I have found is that deleting all the debug etc folders then rebuilding sometimes helpts.

If it only happens in this particular project, try to create a new project & import all the existing files. Other than that, check your project settings for any anomalies (but importing into a new project should also fix that).

For the dependency resolving Joel Coehorn suggests, try a tool like NDepend to visualize the dependencies quickly.

I noticed this issue occured on a solution that had multiple parojects with large datasets in each. Excluding the datasets until compile time eliminated the lag.

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