Re: DLL Hell

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Hans Kesting (news.2.hansdk_at_spamgourmet.com)
Date: 02/23/04


Date: Mon, 23 Feb 2004 15:14:32 +0100


"BeerBoy" <jmacaulay@sbiandcompany.com> wrote in message
news:%23umerPh%23DHA.2704@TK2MSFTNGP12.phx.gbl...
> Consider this :
>
> I have 4 projects :
>
> Project 'Level2' is a simple class library and dependent on nothing else
>
> Project 'Level1A' and 'Level1B' are both dependent on 'Level2'
>
> Project 'App' is dependent on 'Level1A' and 'Level1B' but doesn't use
Level2
> directly
>
> Now all worked well. Then I found a bug in 'Level2' which I fixed and
> recompiled.After I recompiled 'App' everything worked fine again.
>
> Later on I discovered a bug in 'Level1A' which I fixed and recompiled.
> On recompiling 'App' I get a compilation error saying it cannot write
Level2
> to the 'run' folder because of a versioning problem i.e. Level1A and
Level1B
> have different versions in their bin.
>
> Why is this a problem ? I know on disk I have 3 copies of Level2.dll (one
in
> Level2 bin and 1 in each bin of Level1A and Level1B) but the Major and
Minor
> numbers are the same so it shouldn't matter. Infact, in the 'App' if I set
> the 'local copy' to false in the references of 'Level1A' and 'Level1B' and
> then manually copy 'Level1A.dll', 'Leve1B.dll' and 'Level2.dll' (latest
> verion) into the bin then it all works fine ???
>
> I guess I could use the GAC but this is a development server so build
> numbers as changing all the time and I don't really want to put every
build
> into the GAC.
>
> Nor do I want to reference a load of other projects just to get the
> references to work correctly !
>
> How does everyone else handle this ?
>
> Thanks in advance
>
> Jim
>
>

Jim,

There is a fourth copy under App.
Are these projects within a single solution, or did you use multiple
solutions?
If you use 3 solutions (Level2, Level1, App), then if you change Level2 you
need
to recompile Level1 also, before recompiling App.

But : we use different solutions (each having multiple projects) and
sometimes
we encounter problems (sometimes version problems like you saw, usually
problems with the xml-documentation files) that go away when you:
- close (all) VS
- empty all bin-directories
- start VS
- open each solution and rebuild

Hans Kesting



Relevant Pages

  • Re: DLL Hell
    ... Assuming that these are all projects on your machine, your references should ... > Project 'Level2' is a simple class library and dependent on nothing else ... > recompiled.After I recompiled 'App' everything worked fine again. ... > On recompiling 'App' I get a compilation error saying it cannot write ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: recompiling in .NET v2
    ... > I've got an app written under the v1.1 of the .Net framework and I'm ... > now considering recompiling it under v2.0. ... only in key lists / key enumerations. ...
    (microsoft.public.dotnet.languages.csharp)
  • DLL Hell
    ... Project 'Level2' is a simple class library and dependent on nothing else ... Later on I discovered a bug in 'Level1A' which I fixed and recompiled. ... On recompiling 'App' I get a compilation error saying it cannot write Level2 ... references to work correctly! ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: c0000005 - Access Violation
    ... I have an application in VB6 SP6, this app works very fine, but ... ocasinally throws an error c0000005 Exception. ... The stack in Dr. Watson should help to isolate the location of the error. ... try recompiling to pcode and run it. ...
    (microsoft.public.vb.bugs)
  • Re: Strange Results testing .Net vs. COM vs. Classic ASP ...
    ... I ran each app a number of times after recompiling and the results were the ... same - the native .net app took about twice as long to process. ... >> 1) A classic ASP page using an include file encapsulating component logic. ...
    (microsoft.public.dotnet.general)