Add Project Reference vs Add DLL Reference
First one is - Right click on project << Add Reference << Select Project in Project tab
Second one is - Right click on project << Add Reference << Select DLL in Browse tab
one of the most important differences is that a project reference is updated automatically when you change the referenced project.
for example- If you change your DAL method from GetEmployees() to
GetAllEmployees() then you can use GetAllEmployees() immediately in your BL class, without compiling your DAL first.
You typically use the project reference when the reference is part of your solution. In this way the relevant latest code is always used.
You will reference an assembly when it is a third party component or not part of your solution. This is somewhat more static as you will be using the code at the version represented by the assembly. So any changes to the assembly will require you to physically overwrite the referenced assembly with the updated dll.
项目引用与DLL引用的区别

本文探讨了在软件开发中项目引用(Project Reference)与DLL引用(DLL Reference)的不同之处。项目引用允许开发者直接引用解决方案内的其他项目,并能自动更新所引用项目的更改;而DLL引用则通常用于第三方组件,它更为静态,需要手动更新引用的DLL文件。
139

被折叠的 条评论
为什么被折叠?



