在 Visual Studio 2012 中添加对其他项目的引用 [英] Adding references to other projects in Visual Studio 2012

查看:30
本文介绍了在 Visual Studio 2012 中添加对其他项目的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含 4 个项目的解决方案.

I have a solution with 4 projects in it.

Test.CommonTest.Controller(Web 项目的控制器)测试数据(实体框架)Test.Web (MVC4)

Test.Common Test.Controller (Controllers for the Web project) Test.Data (EntityFramework) Test.Web (MVC4)

当我将数据层的引用添加到控制器项目并浏览到数据项目的目录时,我应该使用bin/Debug"目录中的 dll 还是obj"目录中的 dll?而且,这有什么不同吗?

When I go to add a reference to my Data layer to my Controller project and browse to my Data project's directory, should I be using the dll from the 'bin/Debug' directory or the 'obj' directory? And, does it make a difference?

推荐答案

两者都不是.

您应该添加一个项目参考(来自解决方案部分)

You should add a Project reference (from the Solution section)

这将使 Visual Studio 解析来自项目系统的引用,使 Go to Definition 和自动重建等功能工作.

This will make Visual Studio resolve the reference from the project system, making features like Go to Definition and automatic rebuild work.

在您的解决方案之外,您应该从 bin 添加.

Outside your solution, you should add from bin.

这篇关于在 Visual Studio 2012 中添加对其他项目的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆