3

Project1(ASP.NET WebApp) has a reference to DAL.dll (DAL comes from Data Access Layer). Project2(Class Library) also has a reference to a totally different DAL.dll.

I added Project2 as a reference to Project1, but when I run the program I get an error because Project2 uses the DAL.dll of Project1.

What to do?

kovacs lorand
  • 741
  • 7
  • 23
  • 3
    Its a good idea to name your libraries with more unique names. e.g. WebApp.DataAccess.dll and MyLib.DataAccess.dll. Otherwise you are just asking for trouble. – Glen Thomas Mar 28 '16 at 19:58
  • similar? http://stackoverflow.com/questions/3672920/two-different-dll-with-same-namespace – vendettamit Mar 28 '16 at 20:13

1 Answers1

0

Simple Option - Rename Project to Be Unique

So, with this issue you have two options, the simplest way (and best way in my opinion ) is to always prefix your projects so they end up being unique.

Not Unique : Data.Access.Layer

Unique : CompanyName.ProjectName.Data.Access.Layer

konkked
  • 3,161
  • 14
  • 19