473,406 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

[visual studio 2003 build system] incremental build not optimal?

Dear all,

I work on a major system written in C# in visual studio 2003.

Our solution has 10+ projects and all projects are compiled with
/incremental.

In a C++ world, non-incremental builds aren't used for development...it
would simply take too
long to compile an update. So we would naturally expect that incremental
builds for C# would
work great too.

However, we have been experiencing problems in ouy C# project which has lead
us to
disable dependencies between certain projects in our solution.

I can come up with 2 reasons for our slow build times:

1. The dependency analysis carried out by visual studio for C# is buggy
causing more recompilations
than necessary
2. Link times are simple huge due to our big project. (But shouldn't linking
be at run-time/load-time?)

Has anyone else experienced such problems?

Thanks in advance

Thorsten
Nov 17 '05 #1
4 1898
Thorsten,

Linking is never a part of the .NET Framework concept. Code is compiled
to CLR format.

Is your project divided up into various projects? If so, you only need
to recompile what you change. A total recompile of all projects is
never necessary. Dependencies shouldn't be a problem if you put your
common DLLs into the GAC and turn off automatic versioning.

Best Regards
Johann Blake

Nov 17 '05 #2

"Johann Blake" <jo*********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Thorsten,

Linking is never a part of the .NET Framework concept. Code is compiled
to CLR format.
ok, but some kind of linking must happen at some point, right?
Is your project divided up into various projects?
yes. we have one solution with 10+ projects.

should we just have one gigantic project?
If so, you only need
to recompile what you change.
right. that's what I thought.

by "what you change", do you then mean

1. only the files with changes, or
2. files with changes and all files that have imports elements from those
files

?
A total recompile of all projects is
never necessary.
no. agree.
Dependencies shouldn't be a problem if you put your
common DLLs into the GAC and turn off automatic versioning.


when I speak of dependencies I mean the ones defined
from with visual studio. you don't mean that we should
put those often changing dll's into the GAC, do you?

best regards

Thorsten
Nov 17 '05 #3
Thorsten, see my commens below...
Linking is never a part of the .NET Framework concept. Code is compiled
to CLR format.

ok, but some kind of linking must happen at some point, right?

JB: There is no such thing as linking in .NET, at least not the way it
is done using old Visual C++. Only compiling is ever done. During
runtime, .NET Framework attempts to locate and load dependent
assemblies. In fact yesterday I accidently sent someone a compiled
version of my application without the dependencies. When they ran it,
it looked normal until of course the dependencies got accessed at the
point in code where they are used. This so-called run-time locate/load
is the equivalent of the old linking method.

Is your project divided up into various projects?

yes. we have one solution with 10+ projects.

should we just have one gigantic project?

JB: You should always use multiple projects broken down into reusable
components. 10 projects really isn't that gigantic. I've worked on
projects where hundreds of projects made up the product. In fact, most
of your projects should probably be DLLs.

If so, you only need
to recompile what you change.

right. that's what I thought.

by "what you change", do you then mean
1. only the files with changes, or
2. files with changes and all files that have imports elements from
those
files
JB: If designed correctly, you should be able to recompile only the
module that changes. For instance, if you have a C# DLL that is used by
multiple clients that you have written, it normally would not be
necessary to recompile those clients provided that the interface in
your DLL retains backward compatibility. There is a gotcha however. It
has to do with versioning. Versioning under .NET is one of the most
misunderstood and difficult things to get right. If you modify a DLL
that causes a major version number change (although I believe any
version change), your client will not run with the changed DLL. To
avoid this, you need to manually force the versioning number to remain
the same. Alternatively, you can register the DLL to indicate that it
is to work with any version of any client. It's been a while since I've
done that and can't remember exactly how its done, but there is a tool
that ships with Visual Studio .NET that lets you mark your components
versioning to indicate that it is compatible with all clients using a
certain version of your DLL or earlier. I believe this information is
stored in some XML configuration file that you can either manually
modify or use the tool I mentioned.

A total recompile of all projects is
never necessary.

no. agree.

Dependencies shouldn't be a problem if you put your
common DLLs into the GAC and turn off automatic versioning.

when I speak of dependencies I mean the ones defined
from with visual studio. you don't mean that we should
put those often changing dll's into the GAC, do you?

JB: I am referring to the DLLs that you create. If these are intended
to be used among various applications, they really should be installed
in the GAC, especially if they change a lot. If you don't put them into
the GAC, you will be forced to copy the updated DLL to all the
directories where the client applications are installed, and if they
are installed all over the place, lots of fun updating them.

Thorsten

Nov 17 '05 #4

"Johann Blake" <jo*********@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Thorsten, see my commens below...
Linking is never a part of the .NET Framework concept. Code is compiled
to CLR format.

ok, but some kind of linking must happen at some point, right?

JB: There is no such thing as linking in .NET, at least not the way it
is done using old Visual C++. Only compiling is ever done. During
runtime, .NET Framework attempts to locate and load dependent
assemblies.


right...that's dynamic linking :-)
In fact yesterday I accidently sent someone a compiled
version of my application without the dependencies. When they ran it,
it looked normal until of course the dependencies got accessed at the
point in code where they are used. This so-called run-time locate/load
is the equivalent of the old linking method.

Is your project divided up into various projects?

yes. we have one solution with 10+ projects.

should we just have one gigantic project?

JB: You should always use multiple projects broken down into reusable
components. 10 projects really isn't that gigantic. I've worked on
projects where hundreds of projects made up the product. In fact, most
of your projects should probably be DLLs


they are.
..
If so, you only need
to recompile what you change.

right. that's what I thought.

by "what you change", do you then mean
1. only the files with changes, or
2. files with changes and all files that have imports elements from
those
files
JB: If designed correctly, you should be able to recompile only the
module that changes. For instance, if you have a C# DLL that is used by
multiple clients that you have written, it normally would not be
necessary to recompile those clients provided that the interface in
your DLL retains backward compatibility.


I perfectly understand that...my question is if visual studio is
smart enough to figure this out? Or if visual stodio just uses "naive"
file dependency analysis.
There is a gotcha however. It
has to do with versioning. Versioning under .NET is one of the most
misunderstood and difficult things to get right. If you modify a DLL
that causes a major version number change (although I believe any
version change), your client will not run with the changed DLL. To
avoid this, you need to manually force the versioning number to remain
the same. Alternatively, you can register the DLL to indicate that it
is to work with any version of any client. It's been a while since I've
done that and can't remember exactly how its done, but there is a tool
that ships with Visual Studio .NET that lets you mark your components
versioning to indicate that it is compatible with all clients using a
certain version of your DLL or earlier. I believe this information is
stored in some XML configuration file that you can either manually
modify or use the tool I mentioned.


Ok, I might loo at it.
Dependencies shouldn't be a problem if you put your
common DLLs into the GAC and turn off automatic versioning.

when I speak of dependencies I mean the ones defined
from with visual studio. you don't mean that we should
put those often changing dll's into the GAC, do you?

JB: I am referring to the DLLs that you create. If these are intended
to be used among various applications, they really should be installed
in the GAC, especially if they change a lot. If you don't put them into
the GAC, you will be forced to copy the updated DLL to all the
directories where the client applications are installed, and if they
are installed all over the place, lots of fun updating them.


Actually I think they are only copied once because we only have one
application.

Thanks for your help

-Thorsten
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
0
by: tel4 | last post by:
Microsoft Visual Studio Tools for the Microsoft Office System 2003 Microsoft Corp. DATE......: 03-10-2003 TYPE......: Application OS........: WinALL DiSKS.....: xx/02 PROTECTiON : NONE/RETAiL...
26
by: Bruno Jouhier [MVP] | last post by:
I'm currently experiencing a strange phenomenon: At my Office, Visual Studio takes a very long time to compile our solution (more than 1 minute for the first project). At home, Visual Studio...
2
by: Ney André de Mello Zunino | last post by:
Hello. I gladly learned yesterday that Microsoft was making the Visual C++ Toolkit 2003 available for free. Today, I downloaded and installed it and went on to try building some simple...
9
by: TD | last post by:
Which versions of Windows operating systems can you build applications for with Visual Studio 2003, in particular VB? How about Visual Studio 2005, in paricular VB? Thanks, TD
54
by: m.roello | last post by:
In the book: "Working with Microsoft Visual Studio 2005" Craig Skibo wrote: "The power of Visual Studio 2005 lies in its ability to empower users to build, test, and debug powerful applications...
3
by: karlag92 | last post by:
We have a very large C# winforms client application that is constructed as a single solution currently with 75 projects. We're currently using VS 2003 but will upgrade to 2005 some time next year....
5
by: shapper | last post by:
Hello, Does anyone knows what is the difference between Microsoft Visual Studio 2008 Team Foundation Server and Microsoft Visual Studio 2008 Professional? Thanks, Miguel
0
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.