Visual Studio 2008 build takes insanely long time

S

silverfox

I migrated a VB app for the PocketPC 2003 platform from VS2005 to
VS2008 and the build time increased by a huge amount. I suspect
that the problem is that VS2008 always recompiles everything rather
than just the out-of-date components. Whereas it used to typically
take a few seconds to deploy my app under VS2005, it now takes about 5
minutes. And redeploying an unmodified project still takes 5 minutes
to "build" the already-built project. What is causing this and how
can I fix this?
 
S

Simon Hart [MVP]

I don't think this has ever worked properly in any version of VS. I have
found VS always builds projects whether they are out-of-daye or not
regardless of whether you have explicitly set the "On run, when projects are
out of date" to "Prompt to build", you never get prompted VS just builds
anyway. So I have set mine to "Never build" I like to be in control of the
build process and this works fine which allows me to debug quickly. Also
consider turning off the "Deploy .NET CF" under project properties.
 
S

silverfox

I don't think this has ever worked properly in any version of VS. I have
found VS always builds projects whether they are out-of-daye or not
regardless of whether you have explicitly set the "On run, when projects are
out of date" to "Prompt to build", you never get prompted VS just builds
anyway. So I have set mine to "Never build" I like to be in control of the
build process and this works fine which allows me to debug quickly. Also
consider turning off the "Deploy .NET CF" under project properties.


Where do you make that setting? I don't seem to be able to find it.
 
S

silverfox

Where do you make that setting? I don't seem to be able to find it.

Actually, I can't find any of the settings you mention: Neither "On
run when projects are out of date" and its various options, nor
"Deploy .NET CF" under project properties. What am I missing?
 
S

Simon Hart [MVP]

see my other response with regard to the build settings. To supress
deployment of the CF, this option can be found under Project Properties and
the Build tab. I am assuming you are on VS 2005/2008?
 
S

silverfox

Tools/Options/Projects Solutions/Build and Run.

Are you talking about VS2008? You are the second person to try to
direct me to that location but it does not exist on my system. In
Tools>Options>Projects and Solutions, there are three places to enter
some Visual Studio locations and eight checkboxes, none of which are
Build and Run. I can send you a screen grab if you like.
 
S

silverfox

see my other response with regard to the build settings. To supress
deployment of the CF, this option can be found under Project Properties and
the Build tab. I am assuming you are on VS 2005/2008?

Right! VS2008! Are YOU on VS2008? It would seem that we have two
different versions of it if that is the case.
 
S

silverfox

Are you talking about VS2008? You are the second person to try to
direct me to that location but it does not exist on my system. In
Tools>Options>Projects and Solutions, there are three places to enter
some Visual Studio locations and eight checkboxes, none of which are
Build and Run. I can send you a screen grab if you like.

And just to be a little bit clearer, expanding Projects and Solutions
on the left side of the tab shows General and VB Defaults. The
controls I described are in the General tab. In the VB defaults tab
are controls for Option Implicit, Option Strict, Option Compare, and
Option Infer.

No Build and Run.
 
S

Simon Hart [MVP]

It is no different on VS 2008 than VS 2005. What do you see when you expand
the Project and Solutions treeview item? You can email me a screen grab if
you like. What version of VS are you using?
 
S

silverfox

see my other response with regard to the build settings. To supress
deployment of the CF, this option can be found under Project Properties and
the Build tab. I am assuming you are on VS 2005/2008?

Simon,

I posted a screen grab of the Tools>Options screen on my web site if
you are interested.

http://www.donfrenchphotography.com/VSScreenGrab.jpg

As you can see, there is no Build and Run. I suspect that the reason
is that my project is a VB project. What do you think?

Don
 
S

Simon Hart [MVP]

I have 2008 team suite edition and VB.NET installed which also shows the
"Build and run" treeview item. I do see from your screenshot that you do not
have this setting - which is probebly why you can't find it!

I know you are using VS 2008 but what version? The following site contains
product comparison tables:
http://msdn2.microsoft.com/en-us/vstudio/products/cc149003.aspx
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
 
S

silverfox

I have 2008 team suite edition and VB.NET installed which also shows the
"Build and run" treeview item. I do see from your screenshot that you do not
have this setting - which is probebly why you can't find it!

I know you are using VS 2008 but what version? The following site contains
product comparison tables:http://msdn2.microsoft.com/en-us/vstudio/products/cc149003.aspx

Simon,

I discovered why I didn't see the Build and Run feature. There is a
check box at the bottom of the Options form called Show All Settings.
I completely overlooked it and I needed to check it. When I did, that
feature became visible. I think it is a usability mistake to have that
checkbox there though. What real purpose does it serve other than to
be overlooked? It is a tree-view! People expect to be able to see
what is in the tree by expanding the node, not having to take one more
step.

<Ok, usability rant over. :) >

Well, anyway, I finally discovered the true nature of the VS
performance problem. There is a bug that relates to building apps
targeted for CF. The bug results in every subsequent build taking
longer than the previous one. After rebooting, my build time went
from 10 minutes 17 seconds to one minute, 44 seconds. And now it is
growing again.

But I think that there is another bug too. VS rebuilds my project in
its entirety every single time, even when the project is not out of
date. I even went into Run and Build and chose Never as was suggested
here and it STILL rebuilds the project. I ran two successive
deployments doing exactly nothing in between and it rebuilt the
project both times. I created a diagnostic log for both builds and it
shows it recompiling every VB module and rebuilding. The logs were
both 1279 lines long. The total time was longer in the second one,
due to the previously mentioned bug. The ever-growing time-of-build
problem is apparently with the Platform Verification Task, which Arun
suggested disabling. (Thanks, Arun!)

Don
 
S

silverfox

Hi Don,

You may also try to Disable PlatformVerificationTask
I too faced the same issue with VS 2008 build taking long time, I
disbled the PVT and it is better now.
Steps to diable PVT is explained in this blog entry,http://blogs.msdn.com/vsdteam/archive/2006/09/15/756400.aspx

Hope this helps,
Cheers,
Arun

Arun,

Thanks again for that tip. Making that change turned 10 minute builds
into 2 second builds!!! And it also fixed the problem with the ever-
increasing build times. Apparently, that problem was related to
Platform Verification gone bad. I am so happy now!

Don
 
A

Arun

Glad that I could help.
Enjoy coding!!!

Arun,

Thanks again for that tip.  Making that change turned 10 minute builds
into 2 second builds!!!   And it also fixed the problem with the ever-
increasing build times.  Apparently, that problem was related to
Platform Verification gone bad.  I am so happy now!

Don- Hide quoted text -

- Show quoted text -
 
M

mind_the_gap

Thank you very very much - I had exactly the same problem and I
wondered for month what is going on :)

Regards,
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top