Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Slow compile time in a VB.NET solution

Posted on 2014-09-08
12
285 Views
Last Modified: 2015-09-24
I have an average size VB.NET solution made out of 1 Windows application and 3 libraries. When compiling the solution, the libraries compile at what I consider a normal speed (even if they have been modified), but the compiler seems to hang on the application.

Bigger applications compiles 4 to 5 times faster.

Does anybody know of factors that can slow down the compilation time of a Windows application?
0
Comment
12 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40310101
Have you turned on detailed output for the build? Perhaps there's a clue in there.

 Screenshot
0
 
LVL 40
ID: 40310195
Hi kaumed. Thanks for the input.

I did, but it is useless.

Since the display of the build output is displayed in one big chunk at the end of the compilation, there is no way to know what part is holding the compilation.

I also made a comparison of the output from a project that compiles at the standard pace and the one that causes problem, and there does not seem to be any difference in the structure of the output that could point to something different.

The only differences I can see is that my comparison project has more files and more references, so it should be the one that takes time. And it compiles in 01:43 seconds compared to 11.79 seconds. I was conservative when I said 4 or 5 times faster.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 40310662
is your solution all on local disk? all in the same folder root?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 40
ID: 40310772
Yes Éric
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 40311235
are you using nuget? under certain configuration, VS will check for updates on the installed packages.
0
 
LVL 40
ID: 40311251
No Jaime. The application will be distributed through ClickOnce, as are most of my projects, so I never installed NuGet on my main development computer.
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 40311261
Some reasons from the top of my mind. Sorry if they sound too silly:
- Antivirus, for some reasons your AV may be scanning the compiled application
- Have you tried to Cleanup or Rebuild All?
- You may try this, in case some configuration is corrupted: Devenv.exe /resetsettings
- Try to clean the following folder, although I think you are building a desktop app: C:\Users\*yourname*\AppData\Local\Microsoft\WebSiteCache  
- 3rd party source versioning tools like Tortoise may slow down VS
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 0 total points
ID: 40311310
Thanks for the ideas, but no solution in that list.

Antivirus would slow down the compiler on all solutions, not only on one.

Cleanup and Rebuild All are part of my daily routine.

I reset the settings regularly.

As far as I know, the WebSiteCache has nothing to do with Windows Applications, and I do not develop for the Web.

Because I earn my life training programmers in using .NET, I do not use any 3rd party tool. This would hide too many Visual Studio features from me, and I feel that I would not do my job properly if I was not able to answer the questions of my students about the basic tools.

Any other idea?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 40311329
Because I earn my life training programmers in using .NET, I do not use any 3rd party tool. This would hide too many Visual Studio features from me, and I feel that I would not do my job properly if I was not able to answer the questions of my students about the basic tools.

same here :)
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 40311333
btw, antivirus may have a different reaction while scanning an executable file depending on certain criteria based on their "heuristic" algorithm.
0
 
LVL 40

Author Closing Comment

by:Jacques Bourgeois (James Burger)
ID: 40359015
All the proposed solutions were basic features of the environment and of a good way of working. I had already explored them all on my own before asking the question, and nothing new was presented that could help me solve the problem.

Sorry guys.
0
 
LVL 40
ID: 40998686
Finally got it after a hard disk failure.

I reinstalled everything and started testing before installing my antivirus. The problem had disappeared.

Installed the antivirus.

The problem came back.

Uninstalled the antivirus.

Compiled like a charm.

Looks like McAffee checks all the files involved in the compilation, and there are a lot of them.

I will use Windows Defender from now on. It is probably not as efficient as McAfee, but it does not slow down compilation. And I lost more time in the last year waiting for compilations to finish than I would have without any antivirus.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Disable extension 8 48
VB.NET 1 28
SSRS 2016 Rendering HTML tables 3 26
Toolbar to format all windows forms controls at design time needed 5 13
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question