473,583 Members | 3,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

[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...i t
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 1911
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*********@ya hoo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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*********@ya hoo.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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
6168
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 itself. Everything you need is available at no costs (except download hassle and installation time). Once your system is set up properly its just a matter...
0
2265
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 RELEASE NOTES
26
10841
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 compiles the same solution much faster (about 10 seconds for the first project). My home computer is only marginally faster than the one I have at...
2
2944
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 applications. I quickly found out that the toolkit does not come with the multi-threaded versions of the runtime, such as the one I needed to build a...
9
1740
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
6413
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 quickly and easly." I don't agree on what concernes ASP .NET Web Sites in VS2005. All what involves Namespaces in Web sites has been disappeared....
3
1365
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. We've noticed that Visual Studio is terribly inefficient about a lot of things, and my testing with 2005 seems to indicate those problems may...
5
378
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
7319
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 beginning CIS student who is struggling to get their programs working. I work in the computer lab at the college I'm attending and I see many students who...
0
7896
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8186
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8329
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7936
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5704
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5377
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3821
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3847
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1160
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.