views:

1088

answers:

4

I have a strange problem with VS2008. My solution has 8 projects (all c#) and hangs VS when I build. The task manager says "not responding" and the process takes 100% of one of my cores, and the memory usage gradually climbs. Eventualy the IDE responds again, builds and deploys. The hang time seems to grow longer and longer each time I build, but then when I reboot there is no hang and it goes right to the build. Anyone know why?

A: 

No idea, but what happens when you run MSBuild on the command line with your solution? Does it hang? If so, run it again with full verbosity and see where it hangs.

Dave Markle
MSBuild does not hang. It must be some memory leak in the IDE or something. This is an acceptable work around for now...thanks.
Scott Anderson
Totally bummed to hear it. Also check to see if uninstalling some of our VS plugins (if you have 'em) changes anything.
Dave Markle
+1  A: 

You can run Visual Studio in a way as to log what is happening. Open your IDE directory, find devenv.exe.config, and add this line:

  <system.diagnostics>
        <trace autoflush="true" indentsize="4">
            <listeners>
               <add name="myListener" 
type="System.Diagnostics.TextWriterTraceListener, System version=1.0.3300.0, 
Culture=neutral, PublicKeyToken=b77a5c561934e089" 
initializeData="c:\myListener.log" />
               <remove name="Default" />
            </listeners>
        </trace>
    </system.diagnostics>

This should create a log file on you c drive (once you restart visual studio). Be sure to backup your existing devenv.exe.config first.

View the log and hopefully you will see which actions are causing it to take so long.

DarkwingDuck
When I add this to the devenv.exe.config file, I get a lot of package load failures and errors. Is there a typo in it or could I be putting it in the wrong section?
Scott Anderson
A: 

I remember a similar problem. I think that after some service pack was released and we installed it, this problem was fixed. Can you check if you have the latest service pack installed for your version of Visual Studio? (I believe SP1 may still be the latest one)

Evgeny
A: 

I've the same problem when setting custom pre-build action. Entire system does not respond for some time span. SP1 is installed.

ilya.dorofeev