什么是项目引用和项目依赖之间的区别? [英] What's the difference between project references and project dependencies?

查看:2047
本文介绍了什么是项目引用和项目依赖之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Visual Studio 2010中一个简单的解决方案包含了几个静态库,几个DLL和一个可执行文件。

I have a simple solution in Visual Studio 2010 containing a few static libraries, a few DLLs, and an executable.

有些图书馆依赖彼此(例如DLL需要构建DLL本身之前建立了两个静态库项目),似乎有实现这个双向的:

Some libraries depend one another (for example the DLL needs two static lib projects to be built before building the DLL itself), and it seems there are two way to achieve this:

1)如果我右键单击该解决方案,我可以选择项目依赖......,并设置生成顺序

1) If I right click on the solution I can select "Project dependencies..." and set the build order

2)我可以用鼠标右键单击DLL项目,并选择属性 - >框架和引用,然后添加一个新的参考。

2) I can right click on the DLL project and select Properties->Framework and References and then add a new reference.

之间有什么#1和#2的区别?什么是前preSS在Visual Studio 2010中两个项目之间构建依赖于更好的方法?

What is the difference between #1 and #2? What is the better way to express a build dependency between two projects in Visual Studio 2010?

推荐答案

一工程函数定义和项目依赖定义之间的唯一区别是,定义输出组件包含/排除到/从主要的元数据项目链接命令。

The only difference between a "Project Reference Definition" and a "Project Dependency Definition" is the metadata that defines the output assembly inclusion/exclusion into/from the main project link command.

在Visual Studio 2010中,并持续转发,微软希望你开始使用框架和引用对话框,并停止使用项目依赖关系对话框(现在,项目依赖项对话框保持,将可能在未来被移除)。

In Visual Studio 2010-and-going-forward, Microsoft wants you to start using the "Framework and References" dialog, and stop using the "Project Dependencies" dialog (for now, the "Project Dependencies" dialog remains, will probably be removed in the future).

下面是一个博客条目,谈到这一点,和其他项目设置与VS2010的变化,由Visual Studio的开发者之一:

Here's a blog entry that talks about this, and other "Project settings changes with VS2010" by one of the Visual Studio developers:

<一个href=\"http://blogs.msdn.com/b/vcblog/archive/2010/02/16/project-settings-changes-with-vs2010.aspx\">http://blogs.msdn.com/b/vcblog/archive/2010/02/16/project-settings-changes-with-vs2010.aspx

这篇关于什么是项目引用和项目依赖之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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