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

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

问题描述

我有4个项目的解决方案在里面。

I have a solution with 4 projects in it.

Test.Common
Test.Controller(控制器为Web项目)
Test.Data(的EntityFramework)
Test.Web(MVC4)

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

当我去的引用我的数据层添加到我的控制器项目,并浏览到我的数据项目的目录,我应该使用DLL从斌/调试目录或OBJ目录?而且,不是有所作为?

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的解决从项目系统的引用,使得像转到功能定义和自动重建的工作。

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

外解决方案时,你应该添加从斌。

Outside your solution, you should add from bin.

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

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