CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    2

    conflict while loading assembly

    Hi,

    I have an issue with dll reference. I use .Net 2.0 and VS 2005 on Windows 2003

    I am working with 2 class library projects.

    ProductLib which refers ClientBase and CoreLibrary version 1.
    ClientBase too refers CoreLibrary version 1

    All was fine. Then I had to upgrade ProductLib and during that time i had to update CoreLibrary version referred by ProductLib to version 2. and for some reasons I cannot upgrade the CoreLibrary version in ProductLib for now.

    So now I have ProductLib referring CoreLibrary version 2 and the referenced assembly ClientBase referencing CoreLibrary version 1.

    During compilation i get the error "The base class or interface 'CoreLibrary.BaseUtil' in assembly 'CoreLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7t5154a4645b8501' referenced by type 'ClientBase.FileWrapper' could not be resolved"

    Also saw a warning "The dependency 'CoreLibrary, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7t5154a4645b8501'' in project 'ProductLib' cannot be copied to the run directory because it would overwrite the reference 'CoreLibrary, Version=2.0.0.0, Culture=neutral, PublicKeyToken=7t5154a4645b8501'"

    One main change between CoreLibrary 1 and 2 is that in Ver 1 the base class name is BaseUtil and in ver 2 the base class name is BaseUtility.

    How to resolve this issue ?

    Below is what i tried

    1. In ClientBase, in reference properties of the CoreLibrary, I selected "Specific Version" to True and refered the ClientBase in ProductLib as project reference.
    2. With the same reference setting as above this time I tried binary reference (Gac'ed the ClientLib)
    3. With the same setup as above (2) this time i referred the dll directly from GAC (gave the full path)

    Same error in all the cases

    Appreciate any suggestions

    Thanks,
    Som

  2. #2
    Join Date
    Jul 2008
    Posts
    70

    Re: conflict while loading assembly

    You've probably already checked this but I would go to Control Panel->Adminsitrative Tools->Microsoft .NET Framework 2.0 Configuration.

    Make sure you don't have any special assembly configurations. You could also manually remove the old version if it exists.

    I would also be curious to know if the same thing happens on a different machine that has never seen your software before.

  3. #3
    Join Date
    Jul 2008
    Posts
    2

    Re: conflict while loading assembly

    Thanks for your reply

    There are no entries in Configured Assemblies. also I tried the same on different system. Wasn't able to compile...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured