Compiling a massive VB.NET project

To compile my current project, one exe with ~ 90,000 loc + ~ 100 DLL takes about half an hour or more depending on the speed of the workstation.

The build process is one of the running Powershell scripts. This works very well with no problem.

The problem is that it is slow. I want to speed up this build process.

MSBuild (using VS-2005) is one option, but there is an error indicating icons for the vb compiler / linker on the command line, so it won't bind successfully.

What other options are there for creating VB.NET programs?

(A fast workstation is not an option.)

+1


source to share


5 answers


Do you absolutely need to write all the solutions every time? With this many assemblies, it seems unlikely that they all need to be built unless they change. If your solution is composed of multiple projects, you might consider creating multiple solutions in your build environment. One main solution can contain all projects, while another - those that change most often. You can then customize the build process to focus on projects that have changed. Depending on the source control system you are using, you can query the system to determine which projects have changed since the last build and only build those projects.



+3


source


There's NAnt and Cruisecontrol.NET for continuous build.

You mentioned that getting a faster PC isn't an option, but how much memory do you have? 2 GB should be the minimum for a development machine. Plus, using a fast 10K RPM hard drive makes a big difference .



Have you tried disabling any antivirus scanner during build?

+1


source


If possible, upgrade to MSBuild version 3.5. It can create solution files and allows multiprocessing support (or here if you need to host it yourself), allowing it to build projects in parallel.

The caveat is that you need to use project references so it knows what to do.

Also, how long has it been going on now? Have you looked at CPU / Memory usage (using something like PerfMon ) to see if it is a bottleneck?

+1


source


There isn't much to make the build process faster than adding more cores, processor power, and memory to your computer, but that's not an option in your case.

Most large projects are not standalone in a single EXE. More often than not, logical units are moved into separate assemblies, which can be either DLL or EXE. The end result is a whole bunch of small assemblies, not one huge one.

To give one example, one project I was working on was huge, with 700+ forms and 10 out of 1000 classes. Functionally related forms such as those related to printing, generating reports, polling users, etc., were self-contained in their own EXEs. If I was working on reports, I would exclude all non-report projects from the build process, and this will help reduce compilation time from half an hour to a few seconds.

This style of programming can be tricky, but when done right, it just works and works flawlessly.

0


source


If you have a large number of projects, you should try to reduce them. You can always split them into dlls later. The fewer projects, the faster they can be built. Especially if he has to build them in a certain order.

Dividing them into smaller solutions is also possible.

0


source







All Articles