When you make a reference to a .NET assembly, a COPY of that assembly is
placed in your application's /bin folder. If the assembly you are
referencing were to change AFTER you've made your reference to it, you will
not see those changes in your project UNLESS you recompile (which causes new
copies of referenced assemblies to be gotten).
This is the behavior that you are describing and it is by design. I
understand that if the public interface of an assembly doesn't change that
there shouldn't be the need to go get a new copy of it, but that is the
behavior.
However, if you are in production and you need to update one of the
satellite assemblies that your application uses and you know that the
interface for that assembly has not changed, you can simple replace the old
assembly with the new one and you would NOT have to recompile the main
application.
"Peter Bromley" <no****@nowhere .com> wrote in message
news:Ow******** ******@tk2msftn gp13.phx.gbl...
I have a concern which follows on from this discussion.
I am building a .NET application made up of multiple assemblies
(projects) in a single solution. The projects are decoupled as much as
possible so that only a few interfaces are exposed between projects.
But....
Whenever I touch any code in a more fundamental project (say, Storage),
ALL files are recompiled in ALL projects that reference this changed
project.
This is unacceptable! At the moment the compile times are not large as
the project is still at POC stage but I expect the code space to
increase at least 100 to 1000 fold.
Am I missing something, or is this deliberate? Surely VS can determine
whether any exposed types have been changed rather than taking what
appears to be the most pessimistic approach.
Any information would be very much appreciated.
Whatever .dll you want to reference should already be compiled into its
final form (.dll or .exe) before you reference it. The project that
needs to use the referenced .dll need not be compiled to make the reference,
but certainly needs to be compiled in order for its code to run (and
therefore use the referenced assembly).
i have compile my file to dll, and able to make references, i wonder if
idun compile to dll (class), could I still make reference to my project ?
As I stated, you need to have whatever you want to reference already
compiled, because the compiled assembly is what you make a reference to.
The project that is making the reference needs to be compiled to run,
but not to make a reference. An example of this is that a brand new project
in VS.NET will already have references to commonly used .NET assemblies
(system.dll, mscoree.dll, etc.) before you even begin.
---
If you whish to reply to me directly, my addres is spam proofed as:
pbromley at adi dot co dot nz
Or if you prefer - no****@nowhere. com :-)